Change Partition Size On OSRCD
From CobaltFAQs
Note: This process to be amended to show how to add partitions, not just change the size of the existing partitions.
The Partition_Table referred to is in
/nfsroot-x86/bto-sync/production/<release_spec>/installer/release_spec.<product>
For example, on a RaQ 4r, it's
/nfsroot-x86/bto-sync/production/3100R_1.155/installer/release_spec.3100R
The relevant bit of the release_spec file looks like:
# This is the partition table for the product %begin Partition_Table 0,750,83 ,158,5 ,200,83 ,,83 ,30,83 ,,82 %end Partition_Table
The format of each line in this section is:
Start, Size, ID
The sfdisk command used in the cobalt_install script, found in
/nfsroot-x86/bto-sync/production/3100R_1.155/installer/
is
/sbin/sfdisk -f -L -uM
so we're working in megabytes (that's what the -uM switch is for)
- Start = MB to start at (first available MB if left blank)
- Size = number of MB (all if left blank)
- ID = type of partition (Linux, Swap, MSDOS, or other)
First, let's look at a working system (my own RaQ 4r). Run
sfdisk -uM -l /dev/hda
to get something like:
Disk /dev/hda: 58168 cylinders, 16 heads, 63 sectors/track Units = megabytes of 1048576 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End MB #blocks Id System /dev/hda1 0+ 750- 751- 768095+ fd Linux raid autodetect /dev/hda2 750+ 908- 159- 162288 5 Extended /dev/hda3 908+ 1108- 201- 205128 fd Linux raid autodetect /dev/hda4 1108+ 28629- 27521- 28181160 fd Linux raid autodetect /dev/hda5 750+ 780- 31- 30743+ 83 Linux /dev/hda6 780+ 908- 129- 131543+ fd Linux raid autodetect (+ and - after some numbers mean rounding has taken place)
So the Partition_Table info on the OSRCD says:
1st partition (/dev/hda1) = 750 MB, type 83
Regular Linux partition (/)
2nd partition (/dev/hda2) = 158 MB, type 5
Extended partition (holds /dev/hda5 and /dev/hda6)
3rd partition (/dev/hda3) = 200 MB, type 83
Regular Linux partition (/var)
4th partition (/dev/hda4) = rest of disk, type 83
Regular Linux partition (/home)
5th partition (/dev/hda5) = 30 MB, type 83
6th partition (/dev/hda6) = rest of "disk", type 83
(should be about 158-30 or 128MB)
/dev/hda5 and /dev/hda6 are in the Extended partition (to be honest, I'm not sure of their use - fdisk doesn't see them, so I don't think they are actually used... probably a remnant from some early disk layout that never got removed...)
So to give yourself a 1 GB /var and 2 GB / (and the rest in /home), you'd make your Partition_Table section look like
# This is the partition table for the product %begin Partition_Table 0,2000,83 ,158,5 ,1000,83 ,,83 ,30,83 ,,82 %end Partition_Table
(actual sizes of / and /var might vary a couple of MB depending on rounding, etc.)
Then burn your new CD, and your RaQ now has bigger / and /var partition!
NOTE: UNOFFICIAL AND UNSUPPORTED. USE AT YOUR OWN RISK. (Worst case, though, is you have to rebuild the disk again with a "real" OSRCD...)
