Format a device split by a specific template using split

This is indeed a split-use question, but other ideas on how to do this are welcome.

I need to create a boot device configured like this:

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

divided into 4MB blocks using 32 sectors / tracks and 128 heads and using odd start numbers (counting from 1)

MBR: syslinux MBR bootloader

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

section 4: copy of section 1 (yes, before part2!)

section 2: LVM, the remainder of the disk

0


a source to share


1 answer


I would use sfdisk. For example, for several 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

      

+1


a source







All Articles