Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
I reinstall my Winxp as NTFS Yesterday, and i get this error when i boot in to linux by Cd-Rom boot .
RedHat 8.09
cdrom -- linux boot
#chroot /mnt/sysimage
chroot:cannot change root directory to /mnt/sysimage:No such file or directory No such device
#fdisk -l
/dev/hda1 * Fat32
/dev/hda2 Ext'd
/dev/hda5 Fat32
/dev/hda6 NTFS
/dev/hda7 Linux
/dev/hda8 Linux Swap
/dev/hda9 Linux
------------------------------------------------------
I can't view my /etc/fstab because can't change root directory and mount the hda7.
It seems the Winxp installation have destroyed my linux ......
Boot from a linux bootdisk, prefererably one which will allow you to chroot to your root linux directory. Tom's Boot Disk is a good one. I'm unsure of the mechanics of booting from a cdrom, but once you get your partitions mounted you could look around and see what's missing...
Try to see if your partitions have ben mounted. do a simple: mount
That should print the partitions that are mounted and where they are mounted. If your linux partition isn+t mounted anywhere, just mount it yourself.
For example:
fdisk -l
Should print out all the partitions you have. Try to identify the one that your linux (/ root partition) is on. Identify it by size, or by elimination. If oyu know which partition it is on and what type of filesystem it is, even better.
Then just:
mkdir /mylinux
mount -t ext3 /dev/hda1 /mylinux
Change the ext3 to your / (root) filesystem type and /dev/hda1 to the partition you found from fdisk -l.
Then if all goes well and there is no output from the above mount command chroot to /mylinux:
chroot /mylinux
Once there you can use your linux partition as if you were on it.
/sbin/grub-install /dev/hda
This will install grub in MBR and it will come up again after reboot.
This should work for you if you have ext3 filesystem. Does anyone know how to check the filesystem of a partiiton? Maybe check /etc/fstab, it might give you some usefull info on that. Search for the line /dev/hda9 and see what filesystem it is, unless you know what it is, in which case you can fsck it to see whether it is healthy
WARNING:Couldn't open /etc/fstab:No such file or dir
e2fsck :Attempt to read block from filesystem resulted in short read while trying to open /dev/hda9
Counld this be a zero-length partition?
If your root directory is mounted as /mylinux then the fsck command can't find /etc/fstab in its usual place. You can try setting the environment variable FSTAB_FILE to /mylinux/etc/fstab. This environment variable overrides the standard location for fstab. After setting the variable try running your fsck command again.
Sorry, must have read one too many posts when I replied earlier. I didn't notice that /dev/hda9 was your / partition. Anyway, after rereading I gather that you are able to mount your /boot partition. Don't know if this will work, but how about mounting the /boot partition and creating a temporary fstab file. Then set the FSTAB_FILE variable to make fsck happy? You'll need to set up another mount point perhaps /myroot.
Along with the other entries in fstab you'll need a line something like...
/dev/hda9 /myroot ext3 defaults 1 2
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.