TwoFace Posted December 13, 2007 Report Share Posted December 13, 2007 OK, hello! Please, help me with my problem. I had Mandriva Linux 2008.0 PowerPack and Windows XP SP2 on my hard drive, and all worked well. But suddenly, this *bad* Windows crashed, and I reinstalled it. But now I cann't boot to my Linux! I've read here that I can rescue my system using installation disk, but this don't work! Here my steps: 1. I boot from installation DVD 2. I choose rescue from menu 3. I choose mount your partitions under /mnt: Please wait, trying to find your root device... running: vol_id /dev/loop0 /dev/loop0: unknown volume type running: vol_id /dev/sda /dev/sda: unknown volume type running: vol_id /dev/sda1 running: vol_id /dev/sda3 running: vol_id /dev/sda4 running: vol_id /dev/sda5 => found a Mandriva Linux root partition on /dev/sda3 => type ext3, version 'Mandriva Linux release 2008.0 (official) for i586' Mounting other partitions from fstab on /mnt... Your system is ready on /mnt 4. I choose Re-install boot-loader: Installing boot loader... running: sh /boot/grub/install.sh with root /mnt GNU GRUB version 0.97 (640K lower/ 3072K upper memory) [Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a devise/filename.] grub > root (hd0, 3) Filesystem type unknown, partiton type 0x82 grub > setup --stage2=/boot/grub/stage2 (hd0) Error 17: Cannot mount selected partition grub > quit Also, I've tried this without step 3 - same effect. Here what shows Partition Magic 8.0 about my hard drive: ********************************************************************* * Partition * Type * Size MB * Used MB * Unused MB * Status * Pri/Log * ********************************************************************* * Disk 1 * * * * * * * ********************************************************************* * Local Disk (C:) | NTFS | 20 010.6 | 14 847.7 | 5 162.9 | Active | Primary * * (*) | Extended | 100 508.2 | 100 508.2 | 0.0 | None | Primary * * Local Disk (D:) | NTFS | 100 508.2 | 97 525.2 | 2 983.0 | None | Logical * * Local Disk (*: ) | Linux Ext3 | 31 078.9 | 31 078.9 | 0.0 | None | Primary * * SWAPSPACE2 (*: ) | Linux Swap | 1 027.6 | 0.0 | 1 027.6 | None | Primary * ********************************************************************* I have SATA hard drive 160 Gb, 1 Gb RAM Please, help me, cause I really need my Linux back! Thank you! P.S.: Sorry for bad English! Quote Link to comment Share on other sites More sharing options...
Ixthusdan Posted December 14, 2007 Report Share Posted December 14, 2007 Do not mount the partitions. Just choose "Reinstall boot loader." It should be fine. Quote Link to comment Share on other sites More sharing options...
scarecrow Posted December 14, 2007 Report Share Posted December 14, 2007 (edited) And do not install grub to the root partition, but to the MBR instead ( /dev/sda). For example, boot your system using the installation medium or chroot to your local installation, and after that grub-install /dev/sda Edited December 14, 2007 by scarecrow Quote Link to comment Share on other sites More sharing options...
TwoFace Posted December 15, 2007 Author Report Share Posted December 15, 2007 Thank you for answers! Just choose "Reinstall boot loader." It should be fine. When I choose this, I have the same as I discribed in my post#1, step 4 And do not install grub to the root partition, but to the MBR instead ( /dev/sda). Mmm, really, I don't know how to do this. I tried this: I choosed Go to console, and then type: grub-install /dev/sda And this was the answer: mkdir: cannot create directory '/boot': file exists Any ideas? Quote Link to comment Share on other sites More sharing options...
Ixthusdan Posted December 15, 2007 Report Share Posted December 15, 2007 Do not mount your partitions. 1) boot rescue 2) Choose "reinstall boot loader." Do not choose to mount your partitions first. Do not choose this. Do not mount your partitions. Allow the rescue disk to do what it needs to do. When you are choosing to mount the partitions first, you are choosing to manually do things which interferes with the automatic process. Let the rescue system do it. Do not mount your partitions unless you understand how to manually fix the boot record. 3) Allow it the default install to the MBR. Do not change the installation to the linux boot partition. It should install to the drive's MBR, which contains the current windows boot loader. Quote Link to comment Share on other sites More sharing options...
TwoFace Posted December 15, 2007 Author Report Share Posted December 15, 2007 (edited) Mmm, how I said, I've tried this. I boot from DVD, choose Rescue, reinstall boot loader and have this: Installing boot loader... running: sh /boot/grub/install.sh with root /mnt GNU GRUB version 0.97 (640K lower/ 3072K upper memory) [Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a devise/filename.] grub > root (hd0, 3) Filesystem type unknown, partiton type 0x82 grub > setup --stage2=/boot/grub/stage2 (hd0) Error 17: Cannot mount selected partition grub > quit Here is the contents of install.sh: grub --device-map=/boot/grub/device.map --batch <<EOF root (hd0,3) setup --stage2=/boot/grub/stage2 (hd0) quit EOF Edited December 15, 2007 by TwoFace Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted December 15, 2007 Report Share Posted December 15, 2007 Try the manual install method for grub. This is how I normally do it, but you need to know which partition is which for swap, / and /home. If you have others, well, that's OK too, but just need to identify them. Once you know which one is /, you should just need to do something like this: mkdir /mnt/myinstall mount /dev/sda3 /mnt/myinstall chroot /mnt/myinstall source /etc/profile grub --no-floppy root (hd0,2) setup (hd0) quit replace /dev/sda3 with whatever yours is for / and also change hd0,2 accordingly. I'm assuming your / will be /dev/sda5 or /dev/hda5 depending on ide/scsi disks. If this is the case, the (hd0,3) is what you'll need as what is mentioned in your response above from attempting to run the automatic install. If it's still not working, then we'd need to see the output after what you've tried from my example of doing it manually. Quote Link to comment Share on other sites More sharing options...
Ixthusdan Posted December 15, 2007 Report Share Posted December 15, 2007 If you are uncomfortable with messing around, you can also perform an install, choosing the "upgrade" option rather than full install. Mandriva should find the original installation, identify the partitions, (check that it does) and then zip thru the upgrade without installing anything. Finally, it will install the boot loader. Quote Link to comment Share on other sites More sharing options...
TwoFace Posted December 15, 2007 Author Report Share Posted December 15, 2007 If it's still not working, then we'd need to see the output after what you've tried from my example of doing it manually. Ok, I've done what you say. And we have some progress: GRUB is installed, but unfortunately I still cann't load Linux. It says that it cann't mount partition. Here contents of \boot\grub\menu.lst timeout 10 color black/cyan yellow/cyan gfxmenu (hd0,3)/boot/gfxmenu default 2 title linux old kernel kernel (hd0,3)/boot/vmlinuz-desktop BOOT_IMAGE=linux_old_kernel root=/dev/sda4 resume=/dev/sda3 splash=silent mem=1024M vga=788 initrd (hd0,3)/boot/initrd-desktop.img title windows suxxx root (hd0,0) makeactive chainloader +1 title linux 2.6.22.12-1 kernel (hd0,3)/boot/vmlinuz-2.6.22.12-desktop-1mdv BOOT_IMAGE=linux_2.6.22.12-1 root=/dev/sda4 resume=/dev/sda3 splash=silent mem=1024M vga=788 initrd (hd0,3)/boot/initrd-2.6.22.12-desktop-1mdv.img Using lsparts I've fond that sda1 - ntfs (C:) sda3 - ext3 sda4 - swap sda5 - ntfs (D:) So, the root partition is sda3. Maybe I need edit \boot\grub\menu.lst something like this: ..... title linux 2.6.22.12-1 kernel (hd0,2)/boot/vmlinuz-2.6.22.12-desktop-1mdv BOOT_IMAGE=linux_2.6.22.12-1 root=/dev/sda3 resume=/dev/sda3 splash=silent mem=1024M vga=788 initrd (hd0,2)/boot/initrd-2.6.22.12-desktop-1mdv.img ? But I'm not sure about resume=.... entry. Quote Link to comment Share on other sites More sharing options...
scarecrow Posted December 15, 2007 Report Share Posted December 15, 2007 Yes indeed... for your case, /dev/sda3 is equivalent to (hd0,2) Just change it... Quote Link to comment Share on other sites More sharing options...
TwoFace Posted December 15, 2007 Author Report Share Posted December 15, 2007 (edited) Ok, I've changed that file. Now I can start loading my Linux. But, after setting the hostname system halts with this message: Checking root file systemfsck.ext3: Bad magic number in super-block while trying to open /dev/sda4 /dev/sda4: The superblock could not be read or does not describe a correct ext2 filesystem..... Hmmm, now I really don't know what to do... Why it tries to open /dev/sda4, why it checks for ext2 filesystem? I have ext3 on /dev/sda3... Please, help! :sad: :wacko: Edited December 15, 2007 by TwoFace Quote Link to comment Share on other sites More sharing options...
Ixthusdan Posted December 16, 2007 Report Share Posted December 16, 2007 Perchance, did Partition Magic want to "fix" the partitions in order to read them? Quote Link to comment Share on other sites More sharing options...
TwoFace Posted December 16, 2007 Author Report Share Posted December 16, 2007 (edited) Perchance, did Partition Magic want to "fix" the partitions in order to read them? Hm, what do you mean? When I run PartitionMagic only silence I hear! Added: Hm, when I select ext3 partition and choose Check for Errors, I have an error "Access violation at address 004B8016 in module 'PMagicnt.exe' Read of address 00000004C" Edited December 16, 2007 by TwoFace Quote Link to comment Share on other sites More sharing options...
Ixthusdan Posted December 16, 2007 Report Share Posted December 16, 2007 My Partition Magic 8 damaged a Linux installation by "fixing" it. As a result, I stopped using it when in windows. I had to perform a new installation in order to fix the partition error created by partition magic. Quote Link to comment Share on other sites More sharing options...
scarecrow Posted December 16, 2007 Report Share Posted December 16, 2007 I don't think I can help on disks which were touched by Partition Magic... sorry for that. This program should rather be called "Filesystem Destroyer", especially when it comes to ext3/reiserfs. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.