You are not logged in.

#1 2012-06-21 21:19:27

global01
Member
Registered: 2012-06-21
Posts: 3

[SOLVED] Recovering Syslinux after overwriting MBR with Windows repair

After installing Arch Linux on dual boot with windows 7 on the same partition I could't boot on windows,

As I needed to finish a job I decided to use the repair windows function to overwrite the MBR and boot on windows.

Now I'd like to recover syslinux as I also want to use Arch linux;

Please can you show me the proper way to do it as I'm lost in what I found on Internet and I don't want to reinstall Arch from scratch,

I'm currently booting on an Archlinux install usb key to get a prompt,

Regards,

Last edited by global01 (2012-06-22 15:23:34)

Offline

#2 2012-06-21 21:31:02

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: [SOLVED] Recovering Syslinux after overwriting MBR with Windows repair

You can reinstall it using the LiveCD; all you need to do is mount the drives under the "Prepare Disks" section.  Don't reformat or repartition the disk; just mount the partitions, and then select "Install Bootloader" from the main menu.  You can also chroot to your Arch root partition and install it from there.  Really, most instructions you find on reinstalling GRUB after installing Windows will work with Syslinux as well.

Last edited by ANOKNUSA (2012-06-21 21:33:31)

Offline

#3 2012-06-22 07:00:32

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [SOLVED] Recovering Syslinux after overwriting MBR with Windows repair

It's easy. Boot the Arch install media and run:

# dd bs=440 conv=notrunc count=1 if=/usr/lib/syslinux/mbr.bin of=/dev/sda

https://wiki.archlinux.org/index.php/Sy … tion_Table

The partition where Syslinux is installed also needs the "Bootable" flag:

# cfdisk /dev/sda


Or with Parted Magic, perhaps with this method. Except it will be:

# dd bs=440 conv=notrunc count=1 if=/usr/share/syslinux/mbr.bin of=/dev/sda

And set the boot flag with gparted.


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#4 2012-06-22 11:33:12

global01
Member
Registered: 2012-06-21
Posts: 3

Re: [SOLVED] Recovering Syslinux after overwriting MBR with Windows repair

Thanks, I followed your instruction and all went fine regarding syslinux but I still can't manage to boot on Windows,
What I have currently when I run cfdisk is:
sda1 Primary ntfs [PQSERVICE]
sda2 Primary ntfs [SYSTEM RESERVED]
sda3 Primary ntfs [ACER]
sda5 Logical ext2 which is my /boot partition with the boot flag
sda6 Logical ext4
...

My /boot/syslinux/syslinux.cfg for windows has:
LABEL windows
     MENU LABEL Windows
     COM32 chain.c32
     APPEND hd0 0 // I also tried hd0 1, hd0 2, hd0 3 with no success

I can also see that the chain.c32 file is  in /boot/syslinux/

Last edited by global01 (2012-06-22 11:37:46)

Offline

#5 2012-06-22 13:38:35

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [SOLVED] Recovering Syslinux after overwriting MBR with Windows repair

Syslinux starts counting drives from 0 and partitions from 1. It's covered in the wiki.

For Windows 7 you need to point it at the 100 MB "System Reserved" partition (if you use one).

LABEL windows
        MENU LABEL Windows
        COM32 chain.c32
        APPEND hd0 2

If that doesn't work, try this:

LABEL windows
        MENU LABEL Windows
        KERNEL chain.c32
        APPEND hd0 2

And if THAT doesn't work, post the output of "fdisk -l" and your full syslinux.cfg (preferably using pastie.org).


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#6 2012-06-22 14:41:23

global01
Member
Registered: 2012-06-21
Posts: 3

Re: [SOLVED] Recovering Syslinux after overwriting MBR with Windows repair

Thanks  DSpider, you made my day smile

Your first solution works great, I thought I already tried hd0 2 ;(
Have a good day!

Offline

#7 2012-06-22 15:08:33

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [SOLVED] Recovering Syslinux after overwriting MBR with Windows repair

You're welcome.

Don't forget to mark it as solved (by editing the first post).


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

Board footer

Powered by FluxBB