views:

292

answers:

1

Hi,

This is really a parted usage question, but other ideas about how to accomplish this are welcome.

I need to create a boot device set up as follows:

( up to 4MB erase block size (EBS)):

partitions aligned on 4MB blocks by using 32 sectors/track and 128 heads and using odd start numbers (counting from 1)

MBR: syslinux MBR bootloader

partition 1: FAT16 (0x06), 32MB, standard layout, syslinux setup + kernel

partition 4: copy of partition 1 (yes, in front of part2!)

partition 2: LVM, remaining part of disk

+1  A: 

I would use sfdisk. For example, for multiple operating systems:

#Warning: sfdisk starts at zero, fdisk at one
sfdisk --force -i -D -uC /dev/hda << EOF
0 383 07 -;
383 383 83 -;
766 1 0c -;
767 1665 E -;
768 2 a -;
771 120 6 -;
892 120 a5 -;
1013 120 83 -;
1134 120 eb -;
1256 120 82 -;
1377 240 0c -;
1618 796 83 -;
2415 17 82 -;
EOF

#    0    Windows 2000
#  383    Debian
#  766    Free (Fat32)
#  767    Extended
#  768    0a os2 boot
#  771    84 os2
#  892    a5 bsd
# 1013    83 hurd (ext2)
# 1134    eb BeOS
# 1256    82 solaris
# 1377    0c windows98
# 1618    83 HOME
# 2415    82 linux swap
bitozoid