LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 10-10-2006, 08:20 AM   #1
xucaen
Member
 
Registered: Feb 2004
Distribution: fedora 10
Posts: 73

Rep: Reputation: 15
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
 
Old 10-10-2006, 09:01 AM   #2
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,228
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
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..
 
Old 10-10-2006, 10:14 AM   #3
xucaen
Member
 
Registered: Feb 2004
Distribution: fedora 10
Posts: 73

Original Poster
Rep: Reputation: 15
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:
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.
 
  


Reply


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 06:29 AM
fdisk reports /dev/hda1 (root) as FAT32 ! tredegar Linux - Software 3 05-14-2006 04:48 PM
Mounting problem with WD 200GB IDE onChaned 2 Master /dev/hda1 A6Quattro Fedora 1 10-29-2005 04:19 AM
Failed to open device /dev/usb/ttyUSB0: No such device efm Linux - Newbie 2 04-04-2005 08:46 PM
2.6.9 Compact Flash Mounting /dev/hda1 john8675309 Linux - Software 0 01-19-2005 10:16 PM


All times are GMT -5. The time now is 06:04 AM.

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