[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with fat32 creating/booting/resizing

From: Andrew Clausen
Subject: Re: Help with fat32 creating/booting/resizing
Date: Sat, 1 Mar 2003 20:59:56 +1100
User-agent: Mutt/1.4i

On Mon, Feb 24, 2003 at 04:07:02PM -0700, Michael Blandford wrote:
> Hello,
> Here is what I am trying to do:
> Boot from a small linux image via pxe.  Image is only around 6 megs. 
> Image builds a 32meg ramdisk to work with for extra working space.
> What I want to do is:
> create a fat 32 filesystem on a disk.  I would probably want this to be 
> the whole disk.

No problem...

parted --script DEVICE mklabel msdos mkpartfs primary fat32 0 -0 boot 1

(You could get DEVICE from /proc/partitions, perhaps, or some
shell-trickery from dmesg)

> make it bootable - ie equivalent of sys c: via parted or linux that 
> would work for different disk types? ie hda, sda, etc.
> extract a bunch of files onto the new partition.
> I was hoping I could do something like:
> wget http://server/filesystem.tar.gz | gunzip | parted --script 
> <options> to lay it down on the disk.

Why not use tar, or rsync?  Or possibly partimage.

> The end goal is this disk must be bootable into the new fat32 partition.


> I am assuming I need to add something to the boot block as well.

Hmmm... well for this, I'd create a new FAT32 partition, run "SYS X:"
(or whatever) on it from Windows, and then get Parted to copy that
partition to a file.  Then, I'd copy from the file onto the
new partition, rather than doing mkfs.

You'd do something like this:

        dd if=/dev/zero of=winboot.img bs=1M count=1
        parted winboot.img mklabel loop
        parted /dev/hda cp 1 winboot.img 1

Then, to install this bootable image:

        parted winboot.img cp 1 /dev/hda 1
        [ rsync... ]


reply via email to

[Prev in Thread] Current Thread [Next in Thread]