Thursday, March 29, 2012

GRUB shell on arch linux

My previous post mentioned how to boot from a rootfs shell. From what I am experiencing, I screwed up the grub configuration, so when I boot my computer I am entered directly into a grub shell. To get into the rootfs shell so I can boot arch linux ,I issue the following:


grub> kernel=/vmlinuz-linux [ENTER]
[Linux-bzImage, setup=0x4200, size=0x2fc90]
grub> initrd=/initramfs-linux.img [ENTER]
{Linux-initrd @ 0x7fd35000, 0x2ba04e bytes]
grub> boot [ENTER]


It then proceeds to boot the kernel. I am aware that it's taking me to rootfs because I'm not entering the device. I just haven't toyed with it enough, or bothered searching for the appropriate values. /dev/sda and /dev/sdaX do not work. I will update whenever I figure it out.

UPDATE:

I found out what was causing this. The entry in grub (which I have now agonizingly updated to grub2) was set to look for the device /dev/disk/by-uuid/c48c81b7-e772-42a6-95af-f27d768b887b
looking in /dev/disk/by-uuid, that uuid did not exist, nor was it the one for /dev/sda4
I changed it to the corresponding uuid and what it was linked to.

Here is a sample output from my laptop:

# ls -l /dev/disk/by-uuid

lrwxrwxrwx 1 root root 10 Mar 29 14:46 1c7fe2bc-2f14-48e4-84b7-08f1c53a90e2 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Mar 29 14:46 492b94e8-25b4-463b-86a3-6e80d3b40632 -> ../../dm-2
lrwxrwxrwx 1 root root 10 Mar 29 14:46 4c34416c-fc03-4add-b1a0-ba9f5603bc4c -> ../../dm-0
lrwxrwxrwx 1 root root 10 Mar 29 14:46 78b772e4-59b1-4563-b6ab-6d9c24ef9fcd -> ../../sda2
lrwxrwxrwx 1 root root 10 Mar 29 14:46 c3230d94-1048-4c3e-8e35-aea175f6f667 -> ../../dm-1
lrwxrwxrwx 1 root root 10 Mar 29 14:46 f8c7dfa7-907a-4ac5-a2e4-a89e139b7224 -> ../../sdb2


Pretty straightforward, no?

No comments:

Post a Comment