[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-users] HOWTO: Changing partition sizes on a custom OS Restore CD
- Subject: [cobalt-users] HOWTO: Changing partition sizes on a custom OS Restore CD
- From: Bruce Timberlake <bruce@xxxxxxxxxx>
- Date: Tue Dec 31 10:56:01 2002
- Organization: BRTNet.org
- List-id: Mailing list for users to share thoughts on Sun Cobalt products. <cobalt-users.list.cobalt.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
(for the archives...)
Original reference from Gerald:
http://list.cobalt.com/pipermail/cobalt-users/2002-July/073547.html
The Partition_Table referred to is in
/nfsroot-x86/bto-sync/production/<release_spec>/installer/release_spec.<product>
For example, on 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 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 partiton (/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 partiton (/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 1GB /var and 2GB / (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...)
- --
Bruce Timberlake
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+EedAvLA2hUZ9kgwRAqDEAJ0TttzV/wKcoVMowyP1mkjmTmF+TQCfVJ12
vV+Ik8B5Sq8v548J3z8i9kw=
=x4Fl
-----END PGP SIGNATURE-----