[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Constructing a dual boot system
From: |
Felix Miata |
Subject: |
Re: Constructing a dual boot system |
Date: |
Fri, 16 Apr 2010 09:53:08 -0400 |
User-agent: |
Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.8.1.23) Gecko/20090827 SeaMonkey/1.1.18 (PmW) |
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/