[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Constructing a dual boot system
From: |
Michael Evans |
Subject: |
Re: Constructing a dual boot system |
Date: |
Sat, 17 Apr 2010 02:51:46 -0700 |
On Fri, Apr 16, 2010 at 6:53 AM, Felix Miata <address@hidden> wrote:
> On 2010/04/16 12:19 (GMT+0200) Helge Fredriksen composed:
>
>> We have developed our own stripped version of a Ubuntu 8.04 system that
>> launch our own software at boot time. The distro is so small that it fits to
>> a 1.5 Gb partition. The PC is setup with only one partition /dev/sda1. We
>> tailor this PC the way we like it and then makes an installer when we want
>> to deploy.
>
>> Our installer works in the following way:
>
>> * Take a dd copy of /dev/sda to a image file.
>> * Store this image in a Slax environment, and create a slax bootable CD
>> image.
>> * When installing, the slax environment starts a script upon startup where
>> the user can make some choises on IP address, name of PC etc.
>> * The whole template image of /dev/sda is copied directly to /dev/sda on the
>> target PC.
>> * The partition table is a bit altered, adding a swap partition and a giving
>> the rest of the space to /dev/sda3
>
>> Now, this has worked quite fine until many customers require us to make this
>> a multi boot system, where the existing Windows installation is kept.
>
>> I managed to use ntfsresize to shrink the existing partition and use parted
>> to delete the existing + add a new smaller windows partition.
>
>> My idea then was to add another bootable partition immediatly following the
>> windows partition (/dev/sda2). I thought that copying the template PC
>> /dev/sda1 into this partition should then enable me to boot from here
>> instead! Then I could just add another entry into menu.grub with hd(0,0) as
>> boot entry to allow me to get to the Windows booting of /dev/sda1.
>
>> But I'm not able to boot the Linux kernel in /dev/sda2 after doing this dd
>> copy. Any ideas why?
>
> Assuming you're using legacy partitioning because your multibooters (dual
> boot = exactly two; multiboot = more than one, only by chance the same thing
> sometimes) are using mostly WinXP, I'm guessing "cylinder" alignment. I can't
> imagine any simple way to convert an image of /dev/Xda to be used as
> /dev/XdaY. They're just different things.
>
> A primary partition that starts at the front of a HD shares a characteristic
> with logical partitions that it does not share with a primary that starts
> anywhere other than the front of the HD. The former group's boot sector lives
> on the partition's second track. The latter's lives on the partition's first
> track.
>
> You could try making your original live on /dev/sda2 after first creating a
> dummy /dev/sda1, then do 2 images, one as now and one of /dev/sda2, and chose
> which according to whether target will be multiboot.
>
> Don't forget also that many Windows installs were done by system builders
> that install also a recovery partition that might be before or after the
> functional Windows partition. Vista & 7 installations are less likely to be
> using legacy partitioning.
>
> Another problem is that some systems (most often laptops) use a different
> logical "geometry", 240 heads and 63 sectors instead of 255 and 63.
>
>> Any help or links to further reading on how to solve this problem would be
>> much appreciated. I know almost all distros have this kind of functionality,
>> but I'm having a hard time figuring out where to get
>> the exact info on it.
>
> Unless "you" are the one doing all these installs for clients, multiboot
> Windows will likely be a problem too complicated to solve. The
> cross-platform, non-free partitioner/cloner I use http://www.dfsee.com/dfsee/
> has a support mailing list that might be of some use working through this:
> address@hidden
>
> HTH
> --
> "Suppos [sic] a nation in some distant region, should
> take the Bible for their only law book, and every member
> should regulate his conduct by the precepts there
> exhibited. . . . What a Eutopa, What a paradise would
> this region be!" John Adams, 2nd US President
>
> Team OS/2 ** Reg. Linux User #211409
>
> Felix Miata *** http://fm.no-ip.com/
>
>
> _______________________________________________
> Help-grub mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-grub
>
Not quite good enough. The way grub operates is typically to embed a
list of sectors to load in the first stage. I don't know if it's
relative or not.
Since you're already operating from within a linux distribution, you
might find it better to re-run the grub setup in a chrooted script.
This could re-install grub to the partition in it's new alignment, and
then all you'd need to do would be alter the 'boot' flags so that the
windows partition wasn't active and the linux partition was. That's
presuming you're still using an msdos style bootloader in the MBR to
chain the next device.
You could also have grub install in the mbr area instead, since it'd
actually be a little simpler to install at that point, and is the more
typical install method someone would expect.