LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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

Reply
 
LinkBack Search this Thread
Old 12-04-2007, 03:52 AM   #1
AP81
Member
 
Registered: Mar 2005
Posts: 32

Rep: Reputation: 15
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 fix.sh) 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?
 
Old 12-04-2007, 09:45 AM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,284

Rep: Reputation: 136Reputation: 136
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.
 
Old 12-04-2007, 01:23 PM   #3
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
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
Code:
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.
 
Old 12-04-2007, 06:04 PM   #4
AP81
Member
 
Registered: Mar 2005
Posts: 32

Original Poster
Rep: Reputation: 15
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.
 
Old 12-05-2007, 02:13 AM   #5
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
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.
 
Old 12-05-2007, 03:58 AM   #6
AP81
Member
 
Registered: Mar 2005
Posts: 32

Original Poster
Rep: Reputation: 15
Quote:
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.
 
Old 12-05-2007, 10:18 AM   #7
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to switch linux boot loader from syslinux to grub? nickleus Linux - Kernel 3 09-26-2009 03:23 PM
grub slow; alternative? robgig1088 Linux - Software 6 10-26-2006 08:20 PM
Switching from grub to lilo, messed up Lilo.conf, rescuing via Knoppix. SonicGT Debian 2 08-21-2005 01:15 PM
grub-install failure on a syslinux system chrisplinux Linux - General 2 07-14-2004 10:57 AM
Made a bootdisk with RedHat 7.1 to boot: Gave me SYSLINUX, not LILO:Want to use LILO Colonel Panic Linux - Software 0 08-17-2001 06:21 PM


All times are GMT -5. The time now is 04:59 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration