LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 03-07-2015, 01:32 PM   #1
tearsforhari
Member
 
Registered: Mar 2015
Posts: 79

Rep: Reputation: Disabled
Unhappy Help, my data is stuck: Cannot open root device "LABEL=/" or unknown-block(0,0)


Hi,

I am a professor at a university and have a lot of data built up from years on my linux graphics station.

I have RHEL WS release 3 on a DELL 370 Precision Workstation. I just moved my computer and now it doesn't boot properly. It hangs when I boot. It says Cannot open root device "LABEL=/" or unknown-block(0,0).

My /etc/grub.conf file looks like this:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,2)
# kernel /vmlinuz-version ro root=/dev/sdb5
# initrd /initrd-version.img
#boot=/dev/sda3
default=1
timeout=10
splashimage=(hd0,2)/grub/splash.xpm.gz
title Red Hat Enterprise Linux WS (2.4.21-4.EL)
root (hd0,2)
kernel /vmlinuz-2.4.21-4.EL ro root=LABEL=/ hda=ide-scsi hdb=ide-scsi apic
initrd /initrd-2.4.21-4.EL.img


I read a lot of posts by googling that suggest to boot in rescue mode and change in the /etc/grub.conf file: root=LABEL=/ to root=/dev/sda5 or similar. That didn't work.

I tried this too:
mkinitrd --preload=scsi_mod --preload=sd_mod --with=ata_piix \
/boot/initrd.img-2.4.27-sata 2.4.27-4.EL

That made a new file in /boot; but after updating the grub.conf file to look for initrd.img-2.4.27-sata, that didn't work either.

Any suggestions? :|
 
Old 03-08-2015, 08:20 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 17,625

Rep: Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777
Holy hell !.
Have you ever heard of (lack of) security updates ?. Data compromises ?.

I don't recall the last time I used a 2.4 kernel. Minimum 10 to 12 years ago - probably more ....

Jeeesus !!!

How are you listing the grub.conf - and running the mkinitrd ?. Does a rescue boot still work, or are you using a boot floppy/CD ?.
 
Old 03-08-2015, 08:39 AM   #3
odin_ago
Member
 
Registered: Mar 2011
Posts: 61

Rep: Reputation: 1
Before doing everything else:
Do you have another working computer? Do you have another hard drive to make a backup?
 
Old 03-08-2015, 10:15 AM   #4
tearsforhari
Member
 
Registered: Mar 2015
Posts: 79

Original Poster
Rep: Reputation: Disabled
Syg00
Yes, I have been working on this research project for 10 years of my life, working on an important medical problem. My computer is equipped with special 3D modeling hardware and a lot of specialized crystallographic software. I updated the system once from RH9 to RHEL 3 during that time, but not all the home-made programs/binaries would necessarily work if I upgraded constantly. Plus, it is a lot of work. I never had a security comprise once. The computer is behind a firewall and not necessarily always plug in. The university would have informed me if there were problems. Linux is great in that way.

Yes, I can boot from the CD rescue disk. That's how I can make changes to grub.conf.

Odin_ago
Yes, I have spare internal hard drives.

I don't necessarily have another working linux computer, although I am in the process of building another graphic machine with the same 3D capability. I have all my data backed-up on an external HD. However, I am not sure if I backwd-up the /usr/local/programs/directories with all the binaries. It looks like I lost one of my software backup CDs and would like to get it off the old machine, if possible.


It seemed like a common problem back in those days that people were able to overcome. Any suggestions?
 
Old 03-08-2015, 12:36 PM   #5
odin_ago
Member
 
Registered: Mar 2011
Posts: 61

Rep: Reputation: 1
If you have enough free disk space on another hard drive, I would recommend to make a backup of all data (incl. binaries) you have on the problematic hard drive using standard linux means. For example:
1. If your computer has a free hard drive slot inside, connect an HDD with free space there. Otherwise connect it using external case if you have one.
2. Boot from a livecd or a rescue cd (whatever you have).
3. Understand which hard drive is the old one. Unless you have many physical hard drives, it is either /dev/sda or /dev/sdb (or maybe /dev/hda or /dev/hdb if you have a very old kernel on livecd). If you need to mount partitions, better mount them read-only.
4. If you have mounted (or if the liveCD mounts automatically) any partitions of the old drive, unmount them.
5. Alternative A: Mount the partition on the new hard drive with enough free space. If you know which partitions the data you want to backup belong to (for example, /usr is a separate partition, and you have found out that it is /dev/sda2), make a backup of this partition(s):
Code:
dd if=/dev/sda2 of=/path/to/the/place/where/you/want/to/put/the/backup/backupsda2.img bs=1M
Alternative B: Mount the partition on the new hard drive with enough free space. Make a backup of the whole old disk (for this the new disk needs to be at least slightly larger than the old one). Here I assume that the old disk is /dev/sda, change this accordingly if it is not:
Code:
dd if=/dev/sda of=/path/to/the/place/where/you/want/to/put/the/backup/backupsda.img bs=1M
Alternative C: If the new hard drive is at least the same size as the old one and has completely no data inside, you can make use the whole disk as a backup (or, rather, a duplicate, to a certain extent the new and the old disk will be identical). For this, do not create any partitions on the new drive, or, if you have some inside and have mounted them, unmount them. AFTER THIS OPERATION, ALL DATA YOU PREVIOUSLY HAD ON THE NEW DISK WILL BE COMPLETELY LOST FOREVER. Double-check that the old disk is /dev/sda and the new disk is /dev/sdb, OTHERWISE YOU WILL LOSE THE DATA ON THE OLD DISK AS WELL. Then:
Code:
dd if=/dev/sda of=/dev/sdb bs=1M
 
Old 03-08-2015, 12:51 PM   #6
tearsforhari
Member
 
Registered: Mar 2015
Posts: 79

Original Poster
Rep: Reputation: Disabled
I have a brand new scsi hard drive the same size as the old one. I bought it so that I can make a duplicate of the old disk, but I never figured out how to. Before I do Alternative B or C, how do I check what partition the data on my old disk is? Do I type cat mount or something in the rescue CD? Let me know and I can send that to you to advise.
 
Old 03-08-2015, 12:57 PM   #7
fatmac
Senior Member
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Posts: 2,838

Rep: Reputation: Disabled
If you can boot a live distro, use it to copy your work to another disk. Once you have confirmed that you have a back up, then try to get your booting sorted. (By the way, it looks like you needed sda3 not sda5.)

Don't use dd unless you are sure you know what you are doing as one mistake can lose you all your work.
 
Old 03-08-2015, 01:05 PM   #8
fatmac
Senior Member
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Posts: 2,838

Rep: Reputation: Disabled
Using your live distro, mount your disk (#boot=/dev/sda3) read only (mount -o ro /dev/sdb3 /mnt).
Note: it will be a different /dev designation.
Use ls to see where your info is, (ls /mnt), then copy it to your other disk. (Likely to be /dev/sdc.)

Last edited by fatmac; 03-08-2015 at 01:08 PM.
 
Old 03-08-2015, 02:03 PM   #9
tearsforhari
Member
 
Registered: Mar 2015
Posts: 79

Original Poster
Rep: Reputation: Disabled
I need a little line by line instructions. I inserted my linux rescue CD disk. It gave me an option of read-only. I am now at a prompt and typed ls /mnt:

-/bin/sh-2.05b# ls /mnt
runtime source sysimage

if I do the following:

-/bin/sh-2.05b#chroot /mnt/sysimage
sh-2.05b# ls /mnt
cdrom1 lacie_backup smallusb usb_stick floppy cdrom

So I don't know where the mount is supposed to be, i.e. "dev/sdc" that you mentioned? If goto /etc as root and type mount:

sh-2.05b# mount
/dev/sda5 on / type ext3 (rw,defaults)
/dev/sda3 on /boot type ext3 (rw,defaults)
none on /dev/pts type devpts (rw,gid-5,mode-620)
none on /dev/shm type tmpfs (rw,defaults)
none on /proc type proc (rw,defaults)





Also, I tried ro root=/dev/sda3 and no go. I changed it back to ro root=/LABEL=/ and here is the complete error message

VFS: Cannot open root device "LABEL=/" or 00:00
Please append a correct "root=" boot option
Kernal panic: VFS: Unable to mount root fs on 00:00

Last edited by tearsforhari; 03-08-2015 at 02:36 PM.
 
Old 03-08-2015, 02:29 PM   #10
tearsforhari
Member
 
Registered: Mar 2015
Posts: 79

Original Poster
Rep: Reputation: Disabled
Also, let me ask another question:

I can get to all my files on the disk via the linux rescue CD. Can you tell me step-by-step how to mount a new external harddrive and copy the files I want?
 
Old 03-08-2015, 05:23 PM   #11
odin_ago
Member
 
Registered: Mar 2011
Posts: 61

Rep: Reputation: 1
To figure out where your data is:
(Don't do any chroot!)
1. Boot from the rescue CD. For simplicity, do not connect the external hard drive now, there should be only one hard drive connected to your computer now.
2. Say
Code:
ls /dev/sd*
. You should get an output like: sda sda1 sda2 ... There should be one entry sda and several entries of the form "sda"+digit, further they will be shortly denoted by sdan. If your output is not like that, post it here and don't proceed with this instruction.
3. Say
Code:
mount
. You will see several entries starting from /dev/sdan. This will be followed by "on" and a directory name. For each of these lines, say
Code:
ls /directory/name
. You can also see the content of subdirectories:
Code:
ls /directory/name/subdir
. If the files in /directory/name are the files you are looking for, the partition number is n.
4. If at the previous step you didn't find your files, do the following:
For each n such that sdan was listed at step 2, but there were no entry about it at step 3:
4.1 Mount it read-only to /mnt:
Code:
mount -r /dev/sdan /mnt
4.2 Look at the output of
Code:
ls /mnt
or
Code:
ls /mnt/subdirectories
. If you see the files you need, n is your partition number
4.3 Unmount the partition:
Code:
umount /dev/sdan
(end for)

An instruction explaining how to copy the files may be too complicated since now there is to few information. To get more, please do the following:
If you have a USB external drive (or a USB case with a supposedly internal drive in it):
1. boot from rescue CD whitout a connected external drive
2. connect the drive
Otherwise:
1. connect the new drive (if you want to copy files, you need to have the ability to connect both drives simultaneously)
2. boot from the rescue CD
After that, in both situations:
3. Please post the output of:
Code:
ls /dev/sd*
ls /dev/hd*
mount
 
Old 03-08-2015, 09:10 PM   #12
tearsforhari
Member
 
Registered: Mar 2015
Posts: 79

Original Poster
Rep: Reputation: Disabled
-bin/sh-2.05b#ls /dev/sd*
/dev/sda /dev/sda1 ..... /dev/sda14

-bin/sh-2.05b#mount
rootfs on / type rootfs (rw)
/dev/root.old on / type ext2 (rw)
/proc on /proc type proc (ro)
/dev/pts on /dev/pts type devpts (ro)
none on /tmp type ramfs (rw)
none on /tmp/ramfs type ramfs (rw)
/proc/bus/usb on /proc/bus/usb type usbdevfs (rw)
/tmp/cdrom on /mnt/source type iso9660 (ro)
/tmp/loop0 on /mnt/runtime type cramfs (ro)
/dev/sda5 on /mnt/sysimage type ext3 (ro)
/dev/sda3 on /mnt/sysimage/boot type ext3 (ro)
none on /mnt/sysimage/dev/pts tpe devpts (ro)
none on /mnt/sysimage/proc type proc (ro)

-bin/sh-2.05b#ls /mnt/sysimage
bin dev initrd opt ... lib etc home(<-my files) ...

Last edited by tearsforhari; 03-08-2015 at 09:38 PM.
 
Old 03-08-2015, 09:36 PM   #13
tearsforhari
Member
 
Registered: Mar 2015
Posts: 79

Original Poster
Rep: Reputation: Disabled
Connecting a USB drive after booting from Rescue CD:

-bin/sh-2.05b#ls /dev/sd*
/dev/sda /dev/sda1 ... /dev/sda14
/dev/sdb /dev/sdb2 ... /dev/sdb14

-bin/sh-2.05b#ls /dev/hd*
/dev/hda

-bin/sh-2.05b#mount
rootfs on / type rootfs (rw)
/dev/root.old on / type ext2 (rw)
/proc on /proc type proc (ro)
/dev/pts on /dev/pts type devpts (ro)
none on /tmp type ramfs (rw)
none on /tmp/ramfs type ramfs (rw)
/proc/bus/usb on /proc/bus/usb type usbdevfs (rw)
/tmp/cdrom on /mnt/source type iso9660 (ro)
/tmp/loop0 on /mnt/runtime type cramfs (ro)
/dev/sda5 on /mnt/sysimage type ext3 (ro)
/dev/sda3 on /mnt/sysimage/boot type ext3 (ro)
none on /mnt/sysimage/dev/pts tpe devpts (ro)
none on /mnt/sysimage/proc type proc (ro)
 
Old 03-09-2015, 04:06 AM   #14
odin_ago
Member
 
Registered: Mar 2011
Posts: 61

Rep: Reputation: 1
Very strange... Honestly, I don't understand this...
Try this (both with and without USB hard drive)
ls -la /dev/sd*
ls -la /dev/hd*
 
Old 03-09-2015, 09:11 AM   #15
tearsforhari
Member
 
Registered: Mar 2015
Posts: 79

Original Poster
Rep: Reputation: Disabled
Without USB HardDrive rebooting in linux rescue (read-only mode)
-/bin/sh--2.05#ls -la /dev/sd*
brw----- 1 root root 8, 0 Aug 23 7:53 /dev/sda
brw----- 1 root root 8, 1 Aug 23 7:53 /dev/sda1
brw----- 1 root root 8, 2 Aug 23 7:53 /dev/sda2
.
.
brw----- 1 root root 8, 14 Aug 23 7:53 /dev/sda14

-/bin/sh--2.05#ls -la /dev/hd*
brw----- 1 root root 3, 0 Aug 23 7:53 /dev/hda
brw----- 1 root root 3, 64 Aug 23 7:53 /dev/hdb

With USB HardDrive after rebooting in linux rescue
-/bin/sh--2.05#ls -la /dev/sd*
w----- 1 root root 8, 0 Aug 23 7:53 /dev/sda
brw----- 1 root root 8, 1 Aug 23 7:53 /dev/sda1
brw----- 1 root root 8, 2 Aug 23 7:53 /dev/sda2
.
.
brw----- 1 root root 8, 0 Aug 23 7:53 /dev/sda14
brw----- 1 root root 8, 16 Aug 23 7:53 /dev/sdb
brw----- 1 root root 8, 17 Aug 23 7:53 /dev/sdb1
brw----- 1 root root 8, 18 Aug 23 7:53 /dev/sdab2
.
.
brw----- 1 root root 8, 25 Aug 23 7:53 /dev/sdb14

-/bin/sh--2.05#ls -la /dev/hd*
brw----- 1 root root 3, 0 Aug 23 7:53 /dev/hda
brw----- 1 root root 3, 64 Aug 23 7:53 /dev/hdb

As chroot, sdxn and hdxn go upto x=a to z and n=0 to 64 (if it helps),
except that it says brw-rw---- 1 root disk 65, 153 Jun 24 time /dev/sdz9

Last edited by tearsforhari; 03-09-2015 at 09:34 AM.
 
  


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
VFS: cannot open root device "sda3" or unknown-block (0,0) snakeo2 Linux - Newbie 10 07-05-2012 08:23 PM
VFS: cannot open root device "sda1" or unknown-block(2,0) elninio Linux - General 2 10-29-2008 04:05 PM
2.6.19: VFS: Cannot Open root device "sda1" or unknown-block(0,0) havok1977 Linux - Kernel 18 05-03-2007 04:25 PM
FC2; VFS: Cannot open root device "LABEL=/" or unknown-block(0,0) Starchild Fedora 11 01-18-2006 03:39 AM
VFS: Cannot open root device "1601" or unknown-block(22,1) takehora Slackware 3 06-11-2004 08:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

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

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration