LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Problem with bootloader (https://www.linuxquestions.org/questions/linux-newbie-8/problem-with-bootloader-671411/)

debpu06 09-21-2008 01:35 PM

Problem with bootloader
 
Okay, so I had a Mandriva 2007 and windows xp on separate partitions and when I was resizing a third small partition that was on my harddrive through xp I accidentally deleted Mandriva. When I tried to reboot my computer it said GRUB error 22. I can no longer access my xp and I was wondering if there was any way to fix the problem through a linux distribution that I can put on a pendrive cause I don't hava access to a cd burner and I don't have the original xp cds.
Thank you in advance

sycamorex 09-21-2008 01:38 PM

Can you give us the output of:

# /sbin/fdisk -l

and

# less /boot/grub/menu.lst

debpu06 09-21-2008 01:45 PM

[fedora@localhost ~]$ /sbin/fdisk -l
[fedora@localhost ~]$ less/boot/grub/menu.lst
bash: less/boot/grub/menu.lst: No such file or directory
[fedora@localhost ~]$

I am using my friends fedora pendrive on my comp

sycamorex 09-21-2008 01:50 PM

# - means that you need to do it as root, so:

Code:

$ su
write your root password, and then:
Code:

# /sbin/fdisk -l
There is a white space after less

Code:

less /boot/grub/menu.lst

debpu06 09-21-2008 01:54 PM

[root@localhost fedora]# /sbin/fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00de00dd

Device Boot Start End Blocks Id System
/dev/sda1 * 1 5099 40957686 7 HPFS/NTFS
/dev/sda2 5100 19458 115333186+ 5 Extended

Disk /dev/sdb: 8029 MB, 8029470208 bytes
255 heads, 63 sectors/track, 976 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 976 7839698 b W95 FAT32

Disk /dev/dm-0: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-1 doesn't contain a valid partition table

[root@localhost fedora]# less /boot/grub/menu.lst
/boot/grub/menu.lst: No such file or directory

sycamorex 09-21-2008 02:15 PM

Sorry, I just realised that you are using linux from a pendrive.
Try supergrub http://www.supergrubdisk.org/
There's a download for usb as well. It should restore your master boot record.


All times are GMT -5. The time now is 05:11 PM.