You are not logged in.
Pages: 1
Hey Peeps,
So I was playing around earlier today with a GPT/LVM/GRUB2 install. I've read up on it a bunch, as well as the Arch GRUB2 & LVM wiki's and a video on YouTube. Things seem to go well up until the part of doing grub-mkconfig... it doesn't work.
The video tutorial I watched showed it finding the linux and initrd images, but mine doesn't. So needless to say, if I reboot it crashed. I've gotten it to load GRUB2 and start-up if I just delete the entire grub.cfg file and make my own basic one, but this seems much different than other people's experience.
Why is grub-mkconfig not working right? It creates a config file, but saves it as grub.cfg.new instead of grub.cfg. It also doesn't use the contents of /etc/grub.d/custom_40 like the video tutorial shows either.
Thanks for any help!
Here's the video tutorial I was following.
Offline
So needless to say, if I reboot it crashed.
Computers rarely just "crash". More likely, you got some error, right?
Why is grub-mkconfig not working right? It creates a config file, but saves it as grub.cfg.new instead of grub.cfg.
mv /boot/grub/grub.cfg{,.old}
mv /boot/grub/grub.cfg{.new,}
It also doesn't use the contents of /etc/grub.d/custom_40 like the video tutorial shows either.
...
Here's the video tutorial I was following.
http://www.youtube.com/watch?v=69X9ZYA41xU
Please summarise the commands you used from the video. I'm not going to spend my time and bandwidth listening to some youtube wannabe tell me how to do things I can already do and which I would probably do differently.
Last edited by /dev/zero (2012-03-03 03:17:06)
Offline
Can you try re-install with the packages at https://www.dropbox.com/s/jep9t8edsgx3yt6 ?
Last edited by the.ridikulus.rat (2012-03-03 09:20:45)
Offline
You're right... crash isn't the right word. I believe, from memory, the error was something about fd0.
I know I can copy the grub.cfg.new to grub.cfg, just find it odd that none of the other tutorials or installs I've read about discuss doing this.
Here's a transcript of the video taken from https://bbs.archlinux.org/viewtopic.php?id=133170
[root@archiso ~]# modprobe dm-mod
[root@archiso ~]# dhcpcd
...
[root@archiso ~]# pacman -Syy gptfdisk
...
[root@archiso ~]# gdisk /dev/sda
GPT fdisk (gdisk) version 0.8.1
Partition table scan:
MBR: not present
BSD: not present
APM: not present
GPT: not present
Creating new GPT entries.
Command (? for help): [n]
Partition number (1-128, default 1): [RETURN]
First sector (34-[max], default = 34) or {+-}size{KMGTP}: [RETURN]
Information: Moved requested sectory from 34 to 2048 in
order to align on 2048-sector boundries.
Use 'l' on the experts' menu to adjust alignment
Last sector (2048-[max], default = [max]) or{+-}size{KMGTP}: [+32MB]
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): [EF02]
Changed type of partition to 'BIOS boot partition'
Command (? for help): [n]
Partition number (2-128, default 2): [RETURN]
First sector (34-[max], default = 67584) or {+-}size{KMGTP}: [RETURN]
Last sector (2048-[max], default = [max]) or {+-}size{KMGTP}: [RETURN]
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): [8E00]
Changed type of partition to 'Linux LVM'
Command (? for help): [w]
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING PARTITIONS!!
Do you want to proceed? (Y/N): [y]
OK: writing new GUID partition table (GPT).
The operaton has completed successfully.
[root@archiso ~]# pvcreate /dev/sda2
...
[root@archiso ~]# vgcreate arch /dev/sda2
...
[root@archiso ~]# vgdisplay
...
[root@archiso ~]# lvcreate -L 100M -n boot arch
[root@archiso ~]# lvcreate -C y -L 1G -n swap arch
[root@archiso ~]# lvcreate -L 10G -n root arch
[root@archiso ~]# lvcreate -l 100%FREE -n home arch
[root@archiso ~]# lvscan
...
[root@archiso ~]# mkfs.ext2 /dev/arch/boot
[root@archiso ~]# mkfs.ext4 /dev/arch/root
[root@archiso ~]# mkfs.ext4 /dev/arch/home
[root@archiso ~]# mkswap /dev/arch/swap
[root@archiso ~]# /arch/setup
...
Prepare Hard Drive
3 Manually Configure block devices, filesystems andmountpoints
Partition Access Method
dev directly by /dev/* (most intuitive but devicefile names can change
Manage Filesystems
/dev/sda1 raw - 32MiB N
/dev/mapper/arch-boot raw - 100MiB N > [IGNORE]
/dev/mapper/arch-home raw - 91000MiB N > filesystem (re)created? [NO] > ext4 home
/dev/mapper/arch-root raw - 10240MiB N > filesystem (re)created? [NO] > ext4 root
/dev/mapper/arch-swap raw - 1024MiB N > filesystem (re)created? [NO] > swap
Choose bootloader
[SKIP]
Configuration
mkinitcpio > HOOKS="...lvm2..."
DONE
Exit
[root@archiso ~]# mount -o bind /dev /mnt/dev
[root@archiso ~]# mount -t proc /proc /mnt/proc
[root@archiso ~]# mount -t sysfs /sys /mnt/sys
[root@archiso ~]# chroot /mnt /bin/bash
[root@archiso /]# dhcpcd
...
[root@archiso /]# pacman-db-upgrade
[root@archiso /]# pacman -Syy grub2-bios
...
[root@archiso /]# grub_bios-install --boot-directory=/boot --no-floppy --recheck --debug /dev/sda
...
[root@archiso /]# grub-mkconfig -o /boot/grub/grub.cfg
...
[root@archiso /]# exit
[root@archiso ~]# reboot
...
login
...
[root@host ~]# $EDITOR /etc/default/grub
#GRUB_GFXMODE=auto
#GRUB_GFXPAYLOAD_LINUX=keep
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"
[root@host ~]# chmod -x /etc/grub.d/10_linux
[root@host ~]# $EDITOR /etc/grub.d/40_custom
menuentry "Arch Linux" {
insmod lvm
set root=(arch-boot)
linux /vmlinuz-linux root=/dev/arch/root ro
initrd /initramfs-linux.img
}
menuentry "Arch Linux Fallback" {
insmod lvm
set root=(arch-boot)
linux /vmlinuz-linux root=/dev/arch/root ro
initrd /initramfs-linux-fallback.img
}
[root@host ~]# grub-mkconfig -o /boot/grub/grub.cfg
...
[root@host ~]# reboot
All goes well on my end until I get to grub-mkconfig -o /boot/grub/grub.cfg, which in the video shows it finding several images, but in my case none.
Offline
So I downloaded, compiled, and installed grub directly from GNU and everything is working fine, so it appears to be an issue with the version from pacman. The only thing that isn't there seems to be the /etc/default/grub settings file. Any clue how to get this working right? I'm a wee bit of a rook when it comes to compiling things, so I might need to spec some settings that I'm not aware of to make it play nice with Arch Linux. Any thoughts?
Offline
Offline
So I downloaded, compiled, and installed grub directly from GNU and everything is working fine, so it appears to be an issue with the version from pacman.
Let's not jump to conclusions about bugs. It would be helpful if you could reproduce your problem and this time note the error. When setting up lvm, there are a few places where things can go wrong. It complicates it even more when you make /boot part of the lvm instead of on its own separate partition.
The only thing that isn't there seems to be the /etc/default/grub settings file. Any clue how to get this working right? I'm a wee bit of a rook when it comes to compiling things, so I might need to spec some settings that I'm not aware of to make it play nice with Arch Linux. Any thoughts?
I think this is a separate issue. Grub2 will still work right if you directly edit the /boot/grub/grub.cfg. You don't really need to worry about /etc/default/grub if you don't want to. In fact, I would have argued that you shouldn't play with 40_custom either unless it's necessary.
As far as I recall, the two main things to keep in mind with setting up Grub2 and LVM are to use "insmod lvm" if necessary, and make sure the location of your linux root is correct.
Offline
That looks like it! Glad to know I'm not crazy.
Offline
Pages: 1