LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   failed to mount /root on boot after upgrade to lenny: boot hangs (https://www.linuxquestions.org/questions/debian-26/failed-to-mount-root-on-boot-after-upgrade-to-lenny-boot-hangs-585709/)

MrInept 09-18-2007 11:38 PM

failed to mount /root on boot after upgrade to lenny: boot hangs
 
Hi all,

First let me say that before posting i did about two hours of research in forums, so if I missed anything obvious than I'm sorry. I have the problem that I just upgraded from etch to lenny and the new 2.6.21-2-k7 kernel but it won't boot. The error I get is

Code:

Mount: Mount /dev/sda1 on /root failed: No such device
everything after that fails too and then it just stops after recognising all the usb devices (keyboard mouse etc). I've tried with no usb devs plugged in and it makes no diff.

Basically I have my original IDE hard drive hda which runs windows and my linux drive which is sata and has an ext3 partition which is the entire file system including home... everything. as /dev/sda1 it also has sda5 which is a fat32 partition for all my music and sda6 which is the swap.

Fstab:
Code:

# /etc/fstab: static file system information.
#
# <file system> <mount point>  <type>  <options>      <dump>  <pass>
proc            /proc          proc    defaults        0      0
/dev/sda1      /              ext3    defaults,errors=remount-ro 0      1
/dev/sda6      none            swap    sw              0      0
/dev/hdc        /media/cdrom0  udf,iso9660 user,noauto    0      0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0      0
/dev/sda5        /windows        vfat        rw,user,noauto        0        0

Menu.lst:


Code:

title                Debian GNU/Linux, kernel 2.6.21-2-k7
root                (hd1,0)
kernel                /boot/vmlinuz-2.6.21-2-k7 root=/dev/sda1 ro
initrd                /boot/initrd.img-2.6.21-2-k7
savedefault

title                Debian GNU/Linux, kernel 2.6.21-2-k7 (single-user mode)
root                (hd1,0)
kernel                /boot/vmlinuz-2.6.21-2-k7 root=/dev/sda1 ro single
initrd                /boot/initrd.img-2.6.21-2-k7
savedefault

title                Debian GNU/Linux, kernel 2.6.18-custom
root                (hd1,0)
kernel                /boot/vmlinuz-2.6.18-custom root=/dev/sda1 ro
initrd                /boot/initrd.img-2.6.18-custom
savedefault

title                Debian GNU/Linux, kernel 2.6.18-custom (single-user mode)
root                (hd1,0)
kernel                /boot/vmlinuz-2.6.18-custom root=/dev/sda1 ro single
initrd                /boot/initrd.img-2.6.18-custom
savedefault

title                Debian GNU/Linux, kernel 2.6.18-5-k7
root                (hd1,0)
kernel                /boot/vmlinuz-2.6.18-5-k7 root=/dev/sda1 ro
initrd                /boot/initrd.img-2.6.18-5-k7
savedefault

title                Debian GNU/Linux, kernel 2.6.18-5-k7 (single-user mode)
root                (hd1,0)
kernel                /boot/vmlinuz-2.6.18-5-k7 root=/dev/sda1 ro single
initrd                /boot/initrd.img-2.6.18-5-k7
savedefault

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title                Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/hda1
title                Microsoft Windows XP Professional
root                (hd0,0)
savedefault
makeactive
chainloader        +1

Device.map

Code:

(hd0)        /dev/hda
(hd1)        /dev/sda

My best guess would be either kernel 2.6.21 has my sda1 at something else or has some totally new incompatible way of dealing with sata drives.

My sata drive is directly connected to the mother board, other ppl have had similar problems to me (a lot on dapper) only they often seem to either have raid, have or a secondary hdd controller.

Any help would be greatly appreciated. Thanks

Marc

kaz2100 09-19-2007 08:26 AM

Hya,

I may be totally wrong, however, the way to handle sata has changed.
http://www.linuxquestions.org/questi...d.php?t=552263

Happy Penguins!

MrInept 09-19-2007 08:00 PM

This is wierd it works if I change root=/dev/sda1 to /dev/sdb1... but i still leave the device.map the same... and I don't have any other sata drives!

kaz2100 09-20-2007 06:54 AM

Hya,

It looks like my previous post was totally off target.

Happy Penguins!

dahveed3 09-20-2007 02:56 PM

That new hard drive naming, using sda, sdb, even if they're ATA (hda, hdb) hard drives seems to be upgraded to it with some hidden qualifications.

Starting with just an Etch base install and upgrading to testing, the new kernel kept the old naming convention, then when I upgraded to only the Kernel and headers in Sid yesterday I still kept the old names.

Some folks get it and some folks don't. Maybe it's because I always use the metapackages (linux-image-2.6-k7) and have aptitude do the upgrade instead of installing it myself? Perhaps an upgrade preserves the old configuration files whereas a fresh install replaces them.

Don't know, but I always find it strange when I read about folks encountering the new names but I don't get them. I'm not complaining! I checked after the upgrade and again after rebooting in both the grub menu and fstab to make sure and breathed a sigh of relief that the hard drive references were the same. Hopefully, it's easy enough to deal with whenever these upgrades are set to switch me over. A bit unclear though.

utanja 09-20-2007 05:18 PM

Quote:

Originally Posted by dahveed3 (Post 2898321)
That new hard drive naming, using sda, sdb, even if they're ATA (hda, hdb) hard drives seems to be upgraded to it with some hidden qualifications.

Starting with just an Etch base install and upgrading to testing, the new kernel kept the old naming convention, then when I upgraded to only the Kernel and headers in Sid yesterday I still kept the old names.

Some folks get it and some folks don't. Maybe it's because I always use the metapackages (linux-image-2.6-k7) and have aptitude do the upgrade instead of installing it myself? Perhaps an upgrade preserves the old configuration files whereas a fresh install replaces them.

Don't know, but I always find it strange when I read about folks encountering the new names but I don't get them. I'm not complaining! I checked after the upgrade and again after rebooting in both the grub menu and fstab to make sure and breathed a sigh of relief that the hard drive references were the same. Hopefully, it's easy enough to deal with whenever these upgrades are set to switch me over. A bit unclear though.

did you build the sid kernel using the etch config file with its addons (make oldconfig)?

dahveed3 09-21-2007 10:34 AM

I didn't build it, aptitude did! So I have no idea what it used.

To further explain: Etch DVD1 was used to install Debian. I unchecked all the tasks except for Standard when the installer asked what software to install.

On first boot I changed my sources to testing, added non-free and contrib to all of them and the debianmultimedia.org repo.

I did aptitude update, aptitude upgrade, and then aptitude dist-upgrade. Reboot.

That was that. When I saw that 2.6.21 was fine I purged the 2.6.18 Kernel (aptitude purge) and installed the linux-headers-2.6-k7 and build-essential, pkg-config (I think that's what it's called, and the NVidia driver using the patched script for the gpg certified makefile.

No change was made to use the sda naming for my ATA hard drives in this process, and the last time I used Debian just prior to my switching out a SATA hard drive and a different soundcard (the reason I reinstalled) it also used sda for the SATA and hda for the ATA drive.

Seeing there was a new NVidia driver the other day, and no patched script being offered for it yet on that fellows's website, I took the following actions:

Did nvidia-installer --uninstall and dpkg-reconfigure'd the nv driver in.

I had aptitude purge the linux-headers packages. I also deleted the Kbuild-mod folder that aptitude couldn't purge because of the 3rd party Nvidia installer script having put its additional file in there. So I needed to delete that myself.

I added an /etc/apt/preferences file:

Explanation: Shame
Package: *
Pin: origin "download.tuxfamily.org"
Pin-Priority: 999

Explanation: Debian-Multimedia
Package: *
Pin: origin "www.debian-multimedia.org"
Pin-Priority: 998

Explanation: Wine
Package: *
Pin: origin "wine.budgetdedicated.com"
Pin-Priority: 997

Explanation: Security
Package: *
Pin: origin "security.debian.org"
Pin-Priority: 996

Explanation: Lenny
Package: *
Pin: release a=testing
Pin-Priority: 500

Explanation: Sid
Package: *
Pin: release a=unstable
Pin-Priority:90

Then aptitude update, aptitude full-upgrade showed me I was safe as it didn't want to pull anything new from Sid.

So I did aptitude install -t unstable linux-image-2.6-k7 and aptitude upgraded the linux images to 2.6.22 from Sid. It only pulled the linux-kbuild (something like that) package along with it to upgrade and held and did not install zillions of other Sid packages that it would have if I had not made that preferences file with the pin priorities. It ran its post install stuff like update-grub and friends and finished.

Before rebooting I checked the grub menu.lst and fstab and, besides the new sections for booting to the new Kernel nothing else had changed.

So I rebooted to the new Kernel and checked those again and they were the same.

Then I installed the new NVidia driver and have noticed that Compiz Fusion and screensavers, games and stuff no longer have some of the bouts of hesitation I had experienced with the previous driver.

I do get a warning and an offer to cancel from the NVidia installer, and also got this the last time I had installed the older driver. It claims the Kernel is compiled with gcc4.2 and the NVidia driver will be using gcc4.1 and that it might not be a good idea to continue unless you know what you're doing. It said the system might not bootup.

After researching around the last time, the only reference I could find to that was a thread where the user had installed anyway and it worked fine, and another user saying he did that and the NVidia driver was causing crashes.

I saw in aptitude that I have both gcc 4.1 and gcc 4.2 installed. I just left things the way they are and went back and installed the NVidia driver, got the warning, chose to continue, and things are fine.

I suppose if I had actually compiled a Kernel myself I probably would have gotten the new naming scheme because I wouldn't know how to do whatever it is the Debian package does to keep previous settings.

Since everything works I won't complain.

trapix22 10-29-2008 10:21 AM

Unable to boot on Lenny
 
I've tried numerous ways to resolve this but haven't been able to on Lenny. Encrypted entire disk (except /boot) just like I did on another laptop using Etch. Except Etch laptop was /hda and this one is /sda. At boot I get: /dev/mapper/root does not exist.

- Modules are loaded (added to /etc/initramfs-tools/modules)
- Image updated
- /etc/fstab changed to /dev/mapper/root
- /etc/crypttab mapped to /dev/sda5 (my /root)
- Grub changed to /dev/mapper/root (I tried it with /dev/sda5 as well)

It never asks for LUKS password. I just get dropped to (initramfs) shell. However... when I boot Knoppix... everything works. I can open it, mount it, chroot to it... no problems.. Just can't boot.

I even tested through Knoppix - like this:

Rebuit Ramdisk:
#update-initramfs -k all -c

Cheked Ramdisk:
#(chroot) cd /tmp
#(chroot) sudo mkdir foo
#(chroot) cd foo/
#(chroot) sudo zcat /boot/initrd.img-$(uname -r)|cpio -iv
#(chroot) sudo cat /tmp/foo/conf/conf.d/cryptroot

"cryptroot" file is present - so it should boot. Right? I'm up against a BIG wall here. Please help.


All times are GMT -5. The time now is 02:39 AM.