LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   GRUB menu.lst specify root device fs type (https://www.linuxquestions.org/questions/linux-software-2/grub-menu-lst-specify-root-device-fs-type-777342/)

chickenlinux 12-21-2009 08:39 PM

GRUB menu.lst specify root device fs type
 
Hello! I am using Arch Linux (love it, sheer opposite of ubuntu) and installed and configured everything today. I built a kernel from vanilla source and installed it in accordance to instructions I found on the Arch Linux wiki. When I went to put it into grub by vim'ing menu.lst, I first just did what the fallback Arch Linux entry did with a different kernel and initcpio image. Well, I booted, and withing a few seconds, the kernel panicked. I examined the menu.lst again, and found that in the normal Arch Linux entry, the initcpio is not specified. I removed the initrd section, and I got about 1/2 second further! Woo! Well, problem HERE was that it couldn't mount my specified root drive. So, I went back and built and reinstalled kernel with support for ext4 (not boot, but worth a shot anyway) and it didn't work. So then, I changed the way I specified the root volume from
Code:

root=/dev/disk/by-uuid/{lots of annoying 0x numbers} ro
to
Code:

root=/dev/sda1 ro
Well, here I am, and I booted. Next thing I know, it still can't mount. Why? It claims not to know what filesystem type it is. It said it tried ext3, vfat, msdos, blah, blah, but my /boot is (I'm 99% sure) ext2, and it did not try to load sda1 as ext2.

So, if you got through all that junk I just told you, I need to know how to specify in menu.lst (or other file :3) that my root partition for booting here is a ext2 volume.

Ah, yes, and I'm a grub noob, and a bit new to the whole kernel thing. So go easy on me without watering things down too much. I got through the arch install after all! ;)

syg00 12-21-2009 09:05 PM

The default Arch build has ext2 as a module. Ain't gunna work unless it's in the initrd or built in (not module) in the kernel itself.

~sHyLoCk~ 12-21-2009 09:09 PM

Do you have an initrd? If you do make sure you put that after the kernel line.
Quote:

title Arch
root (hd0,0)
kernel /boot/vmlinuz root=/dev/sda1 ro
initrd /boot/initrd.img
Here, replace vmlinuz with your kernel and initrd.img with your initrd. Hopefully this should work. Btw, your root partition is /dev/sda1 right? If not, you need to put your root partition there and change the first line,ie. root (hd0,0) accordingly.

chickenlinux 12-21-2009 11:01 PM

@ sHY: That looks like what I have. I tried the initcpio (arch doesn't use initrd or something here - kernel build instructions said initcpio, and it doesn't want to mkinitrd) , it gave me problems for some reason. I don't use one in my normal boot anyhow.

@syg00: I guess I just assumed the kernel had that already - I bothered to look, and -- holy cats, first thing in the filesystem menu, totally unselected. (I've been messing things up today. Did a bit of C++ code and I made some REALLY dumb mistakes...) I selected ext2 everything, non-modularized. I'll install tomorrow and then let you know how it went.

Thanks for your help thus far! I'm watching the "CC"s scroll down my xterm for kernel compilation as I speak. :)

chickenlinux 12-21-2009 11:01 PM

Okay... So I installed the kernel with ext2 support, and tried booting. Panic! So, I tried again with a initrd specified as the one I made with cpio. Now I get this:
Code:

kinit: Mounted root (ext2 filesystem) readonly
kinit: init not found!

And thereupon the kernel stops syncing and tries to kill init and panics. I don't have a init in /bin, so I tried copying it from /sbin -- no luck :(

Any help from here?

chickenlinux 12-22-2009 09:46 AM

bump (ugh... triple posting... 3X)


All times are GMT -5. The time now is 10:35 PM.