[SOLVED] Help, my data is stuck: Cannot open root device "LABEL=/" or unknown-block(0,0)
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I really don't understand where the /dev/hda and /dev/hdb come from and what they mean, but it seems to me that the new hard disk already have 14 partitions (incl. "extended" ones, i. e. containing other partitions rather than containing data directly) on it, and the old one also has 14 partitions. This makes me guess that you have already copied some data to the new drive. Now I would wait until you find out where the necessary files are on the old drive.
Note that usually (esp. if you have so many partitions) the data in the /home/ folder are on a different partition than the /home folder itself. (In other words, the content of the /home folder is on a partition, which is normally mounted to the mountpoint /home. So if you see a folder home in /mnt/sysimage, which is mounted to /dev/sda5, it does not yet mean that the files in the home folder are also there.
Try the following (without the new drive, without chroot) :
1. Say
Code:
ls -a /mnt/sysimage/home
(and maybe subdirectories) and check if you have your files there. Note that the files in the /home folder and the files in the /usr folder you care about may be on different partitions!
2. If no, then follow the instruction from post 11. I would recommend to modify it slightly (the modified places are now bold) 2.0 say
Code:
mkdir /tmp/oldhome
For each n from 1 to 14, except 3 and 5:
2.1 Mount it read-only to /tmp/oldhome:
Code:
mount -r /dev/sdan /tmp/oldhome
2.2 Look at the output of
Code:
ls /tmp/oldhome
or
Code:
ls /tmp/oldhome/subdirectories
. If you see the files you need, n is your partition number
2.3 Unmount the partition:
Code:
umount /dev/sdan
(end for)
Also, it would be interesing to look at /mnt/sysimage/etc/fstab (please post it here)
Once you know the partition number(s), I would first recommend to check it the partition on the new disk with the same number is identical. Let's say the partition number is n.
1. Connect the new disk
2. Unmount the partition on the old disk if it is mounted:
Code:
umount /dev/sdan
3. Say
Code:
diff /dev/sdan /dev/sdbn
(compare the partitions number n on the old and the new disk byte by byte)
Now, if they are not identical and you want to copy files:
Either you can use dd, which is dangerous, then please say in this thread that you want to use it, I will ask you some more questions to write a step-by-step instructions
Or you can mount both of the corresponding partitions on the new and the old drive and copy files by hand. A disadvanage is that you should be careful about file owners and access rights.
To copy files by hand:
1. Create a temporary folder and mount the partition on the old drive read only:
Code:
mkdir /tmp/oldhome
mount -r /dev/sdan /tmp/oldhome
2. Create a temporary folder if you don't have it yet and mount the partition with the same number on the new drive for writing (you are going to copy data there) :
Code:
mkdir /tmp/newhome
mount -r /dev/sdbn /tmp/newhome
3. Now you can copy files with cp or mc, for example (I don't know if your rescue CD has any GUI). Note that cp can copy recursively and do other good things. For recursive copying, use -r, for other features see man cp.
I haven't tried to unmount /dev/sdan yet. Not sure which that is. Will wait to get your input before proceeding further.
By the way, I want to copy my binaries in a root directory called /programs. (Usually people place progams in /usr/local. I don't. I also want a copy /lib files in case there are drivers I need later. In my home directory, I want to copy .cshrc .bashrc etc files)
No my rescue CD has no GUI. Which version of linux has that?
Last edited by tearsforhari; 03-09-2015 at 07:09 PM.
Apologies for the rant - you caught me in the middle of attempting to rescue another user machine.
Plenty of useful data there, but listing the device nodes (/dev/[hs]d*) is less than useful - especially on a 2.4 kernel where they would have been predefined. As root, with the external plugged in, do this. Post all the output using code tags to retain the formatting (use the advanced button, and click the # toggle)
Code:
fdisk -l
There are better tools, but I'm not sure what would have been back-ported.
If you had done as requested, the formatting would be retained. Is that with the external plugged in ?. I also asked for the entire output - unedited. We need to be able to determine relative disk sizes.
listing the device nodes (/dev/[hs]d*) is less than useful - especially on a 2.4 kernel where they would have been predefined
I didn't know about that property of 2.4 kernels...
The output of fdisk -l should start with
Code:
Disk /dev/sda:
and then its size (which can be useful if we are going to use dd). I would be also interested in looking at the output (with the new drive connected) of
Code:
lsblk -o +LABEL,PARTLABEL
. Or, if this produces an error, then the output of
Code:
lsblk -o +LABEL
lsblk -o +PARTLABEL
(one command should produce an error, the other should work.
For a rescue CD with GUI, I usually use Gentoo LiveDVD https://www.gentoo.org/news/20140826-livedvd.xml . But I am not sure about:
(a) how it will work on your old hardware
(b) if you do any modifications in your system, I am not sure that the old kernel you normally use will understand them well. If you just edit and copy files, I guess it should be OK.
I think I know enough now to say how to copy files to your new disk, but I would wait and see what syg00 will say, because he apparently knows the old kernels better than I. For example, it seems that your new drive has NTFS filesystem on it (which can be changed, but it is much easier, if not only possible, to do this before you copy the files), and I don't know how well the old kernels work with it. Please note that it is either impossible or very non-standard to use NTFS filesystem for a linux root filesystem.
What do you want to do with your new disk? Do you want to use it just for string files or do you want to make it bootable and "primary" disk for a linux computer?
Here is my instruction (make a backup of particular files without changing the filesystem).
1. Boot from the rescue CD (preferably in read-only mode, we are not going to modify anything in the old system now) and make sure that the files you need are present in /mnt/sysimage
2. Connect the new disk.
3. Create a directory and mount the new disk:
Code:
mkdir /mnt/newdisk
mount -t ntfs-3g /dev/sdb1 /mnt/newdisk
4. Copy the files you want. The root of the new disk (or, more precisely, of the first and the only partition on it) is /mnt/newdisk
5. Unmount the new disk:
Code:
umount /dev/sdb1
A folder called /programs looks like a very non-standard idea for me, but I don't see any errors this can lead to (with my linux experience being not very rich).
Ok. I connected an old 40G USB external formatted with VFAT and was able to copy the files I wanted onto it.
I used
Code:
mount -t vfat /dev/sdb1 /mnt/old_usb_hd
cp -r /mnt/sysimage/programs/* /mnt/sysimage/mnt/old_usb_hd/programs
I haven't tried the
Code:
mount -t ntfs-3g /dev/sdb1 /mnt/newdisk
on the new USB drive that holds 1TB. DO you think it will work to copy the entire disk? Tried it: ntfs-3g not supported by kernel.
Can you tell me how to figure out how much disk space I used on my linux drive and how much space I have left on my old 40G drive? Maybe I can just copy everything onto that.
I tried the lsblk command. It doesn't know that command.
Ok. Now that I have all the files I need, I would really prefer to get the boot to work. I had a lot of drivers set for the 3D to work with the video card, and I can't find my notes to redo it. Maybe the boot problem has something to with MBR being corrupted or I lost a mount point. Any suggestions?
Last edited by tearsforhari; 03-10-2015 at 09:51 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.