-   Linux - General (
-   -   Syslinux as an alternative to GRUB/LILO (

AP81 12-04-2007 04:52 AM

Syslinux as an alternative to GRUB/LILO
Hi guys,

I am after a boot loader that can be cloned to any hard drive (regardless of size or geometry). We all know that cloning a drive that uses LILO or GRUB will require installing the bootloader again after being ghosted (unless a block-by-block copy is performed). I want to avoid doing this completely.

At my work we use commercial cloning machines, and these work in "Mirror copy mode" which is a block-by-block copy. The downside of "Mirror copy" is that it doesn't distribute free space, i.e. if the master drive is 160GB and the cloned drive is 250GB, then you are left with unpartitioned free space.

I essentially want to be able to clone drives in "Smart mode" (which distributes free space), however GRUB never works when cloned using Smart Mode. This isn't a problem to me, but to the people performing the task (who aren't Linux savvy), they have to boot Linux (using a custom USB key which I made), then type fix (this runs to reinstall GRUB. Then they have to do this 11 more times to the rest of the computers in the run of clones.

I am hoping that using SysLinux as the bootloader will be able to erradicate the need of reinstalling the boot loader.

Before I get proceed I just wanted to know whether there are any other solutions or whether this is do-able.

Any ideas?

kilgoretrout 12-04-2007 10:45 AM

syslinux is a bootloader that is installed to the mbr. It's typically used for bootable floppies because of its small size. Being a bootloader in the mbr, you will run into the same problems with syslinux that you are running into with lilo and grub.
There are commercial cloning tools that will do what you want if you don't want to do this by hand. Take a look at Acronis True Image.

saikee 12-04-2007 02:23 PM

I think this is a technical problem.

The boot loader works by linking the MBR portion with the rest of the boot loader by the hard disk address. Thus by redistribute the empty space when cloning from a smaller to a bigger hard disk then by default the hard disk address of each partition must be changed. No boot loader can cope with it except the older versions of MS Winodws that boot a primary partition as long as it has the boot flag switched on.

I would suggest the boot loader to be restored more efficiently like by a Grub floppy, or a Grub CD, or a Grub USB device because if the boot loader resides in the x+1 partition of the y+1 disk the command to restore it in a Grub prompt is just

root (hdy,x)
setup (hd0)

For more booting tips see the last link of my signature.

Personally I don't see a way out with syslinux which need to reside in a fat partition and is described by its author as a "light weight" boot loader normally used in a floppy or a USB device.

Cloning it by Acronis is just another aoftware to reproduce the original image.

AP81 12-04-2007 07:04 PM

I found a solution...

I used WinGrub to boot the Linux partition. Winbrub is called from Boot.ini and can boot Linux partitions. The Grub loader in Wingrub (GRLDR) can be configured to find the first Linux partition and boot GRUB from that.

I only wish I found it earlier.

saikee 12-05-2007 03:13 AM

If my prediction is correct WinGrub will give you the same result if you resize the partition in a cloning operation.

Never used it before but I believe WinGrub is just to boot up a Grub which can be fire up on its own in a data partition by a MS Windows' MBR. All it takes is to switch on the bootable flag in the data-only primary partition where Grub resides.

AP81 12-05-2007 04:58 AM


If my prediction is correct WinGrub will give you the same result if you resize the partition in a cloning operation.
Already tried it and it worked. "Clever copy" mode on the cloning machine resized all the partitions and WinGrub still worked.

In fact, only gldlr.exe is needed (boot.ini = c:\gldlr="Linux"). GLDLR searches for the first Linux partition (whether bootable or not), locates grub and displays the grub menu. I did some more tests by zeroing out the volume boot record on the Linux partition and it still worked.

saikee 12-05-2007 11:18 AM

The reason why Grub can't find its second part (or stage2) in a resized partition is because the hard disk address has been changed once the partition boundary has been altered.

In your case the stage2 is supplied by WinGrub and possibly inside the Windows partition too. Thus Grub is self contained and will work exactly if you boot it from a floppy. WinGrub does the search of the menu.lst automatically and will be able to execute the menu.lst. This scheme works as Grub boots each system "directly". It will break down if Grub boots the distro "indirectly" with chainloading.

All times are GMT -5. The time now is 10:38 AM.