LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Can't find boot device? (https://www.linuxquestions.org/questions/linux-general-1/cant-find-boot-device-869216/)

derchris 03-17-2011 11:49 AM

Can't find boot device?
 
Hey,
I just compiled my first own kernel (I'm using Arch Linux), following the tutorial on the german site.
Now I tried to boot it, I ended up failing with this message:

Code:

Waiting 10 seconds for device /dev/sda1 ...
Root device '/dev/sda1' doesn't exist, Attempting to create it.
ERROR: Unable to determine major/minor number of root device '/dev/sda1'

Here is the important part of my menu.lst:

Code:

# Arch Linux
title Arch Linux
root (hd0,0)
kernel /vmlinuz26 root=/dev/disk/by-uuid/somelongid ro
initrd /kernel26.img

# my one
title mine
root (hd0,0)
kernel /vmlinuz root=/dev/sda1 ro
initrd /initrd.img

Note that on my first try, I simply copy&pasted the Arch-entry, i.e. I also had the disk by uuid there. The failure message was the same, just the root device name was the different name

Also, at first I did not have the initrd line in my menu.lst (as written in my tutorial that I may not need it). In this case I had this error message:

Code:

[ 1.xx (kerneltime I guess)] VFS: Cannot open root device 'disk/by-uuid/blabla' or unknown-block(0,0)
[ 1.xx ] Please append a correct "root=" boot option; here are the available partitions:
[ 1.xx ] 0b00  1048575 sr0 driver:sr
[ 1.xx ] ekrnel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)


I am using a 2.6.38 Kernel running on VirtualBox, using ArchLinux with LXDE

andrewthomas 03-17-2011 12:19 PM

Do you have more than one drive attached when you boot?

What was the exact command that you used to generate your initrd.img file?

derchris 03-17-2011 12:29 PM

What do you mean with more than one drive attached? I only got one harddrive, which was formatted during Arch installation int a /root, a swap and a rest partition.
No USB or CD media are in there.

I created initrd using

sudo mkinitcpio -k 2.6.22 -g /boot/initrd.img

andrewthomas 03-17-2011 12:32 PM

Quote:

Originally Posted by derchris (Post 4294132)
What do you mean with more than one drive attached? I only got one harddrive, which was formatted during Arch installation int a /root, a swap and a rest partition.
No USB or CD media are in there.

I created initrd using

sudo mkinitcpio -k 2.6.22 -g /boot/initrd.img

The update to glibc-2.12.2-1 increases the minimum required kernel version to 2.6.27. This kernel version was chosen as it is currently the oldest kernel with longterm support upstream. Users of the Arch "kernel26" and "kernel26-lts" packages are unaffected by this change.

Those wanting to continue the use of an older kernel version will be required to rebuild the glibc package with the appropriate adjustment made to the "--enable-kernel" configuration option.

derchris 03-17-2011 12:47 PM

Woaa, sorry, bad typo -.-
Of couse I put the right version there

sudo mkinitcpio -k 2.6.38 -g /boot/initrd.img

andrewthomas 03-17-2011 01:02 PM

Where did you get the sources from?

2.6.38-1 is in testing. Is there any reason why you choose not to use this one?

You could always compile a custom one from the PKGBUILD.

I am running a git kernel and my kernel is 2.6.38+.

Is your /lib/modules/2.6.38 or /lib/modules/2.6.38+?

derchris 03-17-2011 01:07 PM

I got the source from kernel.org - it's stable and mainline.

I choose this way without PKGBuild b/c I want to work within the kernel (i.e. code new modules) and I wasn't sure whether I had to compile the whole kernel using PGKBUILD when I just made small changes.

My lib mobuldes was 2.6.38

andrewthomas 03-17-2011 01:11 PM

Does your /etc/fstab refer to UUID's?

If it does, then your mkinitcpio command should have worked, so you must have messed up when you compiled your kernel.

farmerdan 03-17-2011 01:30 PM

Whenever I have encountered this situation, I've mis-configured the kernel either by not adding support for the drive or the file system that's on it. I recommend passing your hard drive manufacturer through `grep` on the kernel .config file. Alternatively, you could unpack the kernel source, if you haven't kept it around, copy the .config file to the tree and run `make {x,menu,old}config` and visually inspect all of these areas.

Looks like your boot commands should work, although I think you're using Lilo and that has been a long time for me. The "kernel panic" got my attention.

You could also search through the Linux From Scratch archives. There's been some discussion in the last few months about problems using Virtual Box. Since you're running Archlinux, you may also want to try the CLFS archives.

Good luck.
Dan

derchris 03-18-2011 03:51 AM

Thank you, that was the problem. Seems I must have accidently unchecked a driver needed

farmerdan 03-18-2011 09:55 AM

Glad I could help. My experience is that these things are usually something simple. The problem is in knowing what's simple.:banghead:

Dan


All times are GMT -5. The time now is 06:55 PM.