Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Congratulations, that is the coolest OS breakage I have ever seen. However I'm going to guess that's not much consolation.
cd does nothing besides change directories so, barring a terrible bug in cd, you didn't rename your / . As to what actually happened, I have no clue. At least not yet. If you have the ability could you try and mount your hard drives using some sort of liveCD, and also could you explain exactly what happens in the boot procedure? Does the machine post, and then the BIOS complains that it can't find a MBR ( or Operating System in some cases )?
If that's the case you might try reinstalling your boot loader with your distribution's install disk.
But that's a wild guess. I'd feel much better knowing if you can mount your hard drives with a liveCD first.
So you renamed them and then rebooted *before* finding a solution? Your only hope is to do as goofyheadedpunk said and use a live-cd. Try knoppix. It will mount your partitions under /mnt/hdx and you can go in and attempt to fix what is wrong.
Originally posted by rioguia i am going to try to mount it now. i have the rhce book and am going over the recovery options. any thoughts would be appreciated.
If it will boot a kernel off the cd in recovery mode then you need to mount your root partition. From your command line above, it looks like you renamed the directores with a trailing slash /. You need to rename them to remove it.
device boot start end block id system
dev/hda1 * 1 14 105808+ 83 Linux
dev/hda2 15 691 5118120 83 Linux
dev/hda3 692 5224 34269480 83 Linux
dev/hda4 5225 5310 650160 F win95 (I think this is just a disk geometry error that was noted during the install)
dev/hda5 5225 5310 650160 82 SWAP
chroot /mnt/sysimage
df (to see what the file system looks like)
Filesystem 1-K blocks Used Available Use% Mount
dev/hda3 33731664 9150260 22867932 29% /
dev/hda1 102454 6127 91037 7% /boot
none 33731664 9150260 22867932 29% /dev/shm (psuedo file type for shared memory)
dev/hda2 5037736 192144 4589688 5% /home
I don't see anything related to dev/hda4 or dev/hda5 (SWAP). If four is just a glitch, is dav/hda5 swap supposed to mount under rescue?
i have added a new install on a new hard drive hda and have placed my older linux system on hdb.
i want to copy my data to hda but i am betting lots of complaints that linux is trying to mount the old file systems by duplicate names for the current operating system.
Does FDISK allow me to fix this problem. if so, how?
I don't see anything related to dev/hda4 or dev/hda5 (SWAP). If four is just a glitch, is dav/hda5 swap supposed to mount under rescue?
FYI:
hda4 is (was) an extended partition. In a nutshell it is a container for logical partitions and its purpose is for creating more then four partitions. The extended partition as well as swap does not show up via df nor is it mounted.
I assume your running either Redhat or Fedora. The OS uses partition labels in the fstab to identify the filesystems. Since you have multiple partitions with the same label the OS does not know which to use. Use the tune2fs command to relabel the old partitions to something else.
Thanks. This looks great.
DESCRIPTION tune2fs allows the system administrator to adjust various tunable filesystem parameters on Linux ext2/ext3 filesystems.
-L volume-label
Set the volume label of the filesystem. Ext2 filesystem labels can be at most 16 characters long; if volume-label is longer than 16 characters, tune2fs will truncate it and print a warn- ing. The volume label can be used by mount(8), fsck(8), and /etc/fstab(5) (and possibly others) by specifying LABEL=volume_label instead of a block special device name like /dev/hda5.
so i want to rename the volume label hdb's /boot partition to /boot_old
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,634
Rep:
I don't understand.
1st: Your system now complains about duplicate names, which signals in my opinion, that your old directories were NOT renamed?!? Then something else causes this abnormal behaviour (and, furthermore, as stated above, "cd" can't rename).
2nd: Why don't you simply rename the directories back like
Code:
man mv to make sure of the options:
R for recursive (subdirectories)
d for directories only
mv -Rd '*/' *
Are you saying that oly the root " / " was changed (i.e. became "/ /" and that this will make all the file directories back to the old structure?
EXAMPLE
1. remove the replacement drive.
2. reboot the old drive with the rescue disk
3. at the prompt
mv -Rd '*/' *
4. reboot adn operating system will be found.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.