LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Mounting /dev/hda1 on /root failed: no such device (https://www.linuxquestions.org/questions/debian-26/mounting-dev-hda1-on-root-failed-no-such-device-491096/)

xucaen 10-10-2006 08:20 AM

Mounting /dev/hda1 on /root failed: no such device
 
Hi, does anyone know why the new kernels on Debian testing fail to boot? I get a message

Mounting: /dev/hda1 on /root failed: no such device.

/dev/hda1 is valid on kernel 2.6.7-1-k7, but I have tried kernel 2.6.16-2-k7 and kernel 2.6.17-2-k7 and they both fail with the same message.

thanks,

Jim

farslayer 10-10-2006 09:01 AM

I recall having difficulties moving from 2.6.8 to 2.6.12.. there were some additional itens that needed to be installed..

Yaird and udev are needed if I recall.. http://wiki.debian.org/InitrdReplacementOptions
Quote:

I tried to upgrade udev, but it said it was already the latest version.
Then I did apt-cache show udev which ltold me udev conflicted with initramfs-tools. That is exactly the package where the initrd is built with! Googled for replacement and there it is.

apt-get install yaird
apt-get --purge remove initramfs-tools

This way the compatible package for udev is installed. The only thing to do is reinstall your kernel, or remake your initrd.

dpkg -i kernel-image-2.6.15.deb <= this must be your deb ofcourse.

This is the way I solved my problem.

A couple sites / posts that discuss Yaird during the Debain kernel upgrade
http://www.csg.is.titech.ac.jp/~leng...ata/index.html
http://www.linuxquestions.org/questi...d.php?t=429112
http://www.linuxquestions.org/questi...d.php?t=452854

Best of luck to you..

xucaen 10-10-2006 10:14 AM

Solved!
 
For the past few days I have been trying to upgrade my Debian system.

At first, I had probelms with xorg and getting all of my package dependencies met.

Then, I had an issue with KDE: the old config file prevents the kicker panel from being displayed. (see my other posts for fix)

Then I noticed that direct rendering on my Matrox G450 card wasn't set. That sent me off on a wild goos chase, but did get my arse motivated to download and install the latest and greatest drivers from Matrox.

Then, I noticed my USB flash drive wasn't detected..

Then, my printer no longer worked.

Oh boy, it was a mess. I tried installing a new kernel image.

First I installed kernel 2.6.16, but that dumped me into an initramfs prompt. I then installed 2.6.17, with similar results..

So, I began debugging my boot process.. I noticed something called udev was getting loaded.. but that udev didn't load when booting my old kernel 2.6.7.

After a few days of reserch, and some postings of my own, I finally have solved the udev/kernel 2.6.17 issues.

It all has to do with the way the kernal sees the hard drives and the (I think) the way udev presents these hard drives to the operating system.

Ok, while there are message posts out there in many forums that talk about problems with udev, it seems the general consensus is to do some major reconfiguring of the udev rules files. This is NOT what I had to do. I never even attempted it.

It seemed to me that the gods of the Debian project would have choses a more elegant solution. Rather than forcing us to reconfigure everyting, I had only to understand a very simple concept: booting by label name.

That's right! You can configure fstab to point to hard drive label names instead of device names! And the grub/menu.lst can also point to the lebel name.

Why would anyone do this? Very simple! You can now put your hard drive on any open IDE connector, and not have to reconfigure anything. You can add new drives, swap them around, and still linux will boot. Evenm though behind the scenes your /dev/hda1 may become /dev/hdb4, it will still have the same label. Neet, huh? :D

Once I hit on this idea, it was a simple procedure to set up my fstab to use labels and set grub to use the label of my boot drive.

Oh, BTW. I never used labels before, so I needed to use a tool called e2label to assign labels to all of my drives. Easy stuff.

For comparison, here is an excerpt from my old fstab file:
Code:

##############
# hard drives
##############
/dev/hda1  /      ext3    defaults,errors=remount-ro  0  1
/dev/hde2  /usr    ext3    defaults,errors=remount-ro  0  2
/dev/hde5  /home  ext3    defaults,errors=remount-ro  0  2

Now, here is an excerpt from my new fstab file:
Code:

##############/dev/lp0: Permission denied
# hard drives
##############
LABEL=BOOTDRIVE  /    ext3  defaults,errors=remount-ro    0  1
LABEL=USR        /usr ext3    defaults,errors=remount-ro  0  2
LABEL=HOME        /home ext3    defaults,errors=remount-ro  0  2

and here is an excerpt from my old grub/menu.lst file. note that this does not boot:
Code:

title      Debian GNU/Linux, kernel 2.6.17-2-k7
root        (hd0,0)
kernel      /boot/vmlinuz-2.6.17-2-k7 root=/dev/hda1 ro
initrd      /boot/initrd.img-2.6.17-2-k7
savedefault

And here is the entry that finally boots:
Code:

title      Debian GNU/Linux, kernel 2.6.17-2-k7
root        (hd0,0)
kernel      /boot/vmlinuz-2.6.17-2-k7 root=LABEL=BOOTDRIVE ro
initrd      /boot/initrd.img-2.6.17-2-k7
savedefault


There it is folks..
Oh, one more thing.. all those other issues that I had that I could not solve? Well, this solved them all! I now have direct rendering turned on, my usb flash drive is mounted, I still don't have a printer but that should not be too hard to track down (I hope)

Thank you to everyone who replyed to my posts. It was a long hard chase, but the bugs be squashed!

Jim

p.s. Xorg is running beautifully. ;)


All times are GMT -5. The time now is 05:45 AM.