Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Debian This forum is for the discussion of Debian Linux.


  Search this Thread
Old 10-10-2006, 09:20 AM   #1
Registered: Feb 2004
Distribution: Ubuntu 17.10
Posts: 89

Rep: Reputation: 16
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.


Old 10-10-2006, 10:01 AM   #2
LQ Guru
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,243
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
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..
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

Best of luck to you..
Old 10-10-2006, 11:14 AM   #3
Registered: Feb 2004
Distribution: Ubuntu 17.10
Posts: 89

Original Poster
Rep: Reputation: 16
Thumbs up 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?

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:
# 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:
##############/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:
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
And here is the entry that finally boots:
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

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!


p.s. Xorg is running beautifully.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Failed to open audio device (/dev/dsp): No such device stevesk Slackware 6 01-01-2009 07:29 AM
fdisk reports /dev/hda1 (root) as FAT32 ! tredegar Linux - Software 3 05-14-2006 05:48 PM
Mounting problem with WD 200GB IDE onChaned 2 Master /dev/hda1 A6Quattro Fedora 1 10-29-2005 05:19 AM
Failed to open device /dev/usb/ttyUSB0: No such device efm Linux - Newbie 2 04-04-2005 09:46 PM
2.6.9 Compact Flash Mounting /dev/hda1 john8675309 Linux - Software 0 01-19-2005 11:16 PM > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 07:12 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration