[PLUG] Adding disk partitions to an existing system
Bill
bill at coho.net
Thu Jun 13 23:55:03 UTC 2002
On Thu, 13 Jun 2002, Jeme A Brelin wrote:
Jeme and other helpful souls--I probably made the partition table for
this puppy with W2k's fdisk (it's been a while). What I've done so far is
to juggle swap partitions to where my current swap partition is in the
same physical location on the disk but is now a primary partition (I
actually didn't plan to do it that way, but I found after making a
new swap partition and turning it on I had my disk sliced up in a bad way,
with non-contiguous free space that I couldn't put in an extended partition, so
I juggled things around with a minimum of good planning until I had a
usable setup).
I now have
(output from fdisk -l)
Disk /dev/hda: 128 heads, 63 sectors, 969 cylinders
Units = cylinders of 8064 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 919 969 205632 82 Linux swap
/dev/hda2 1 406 1636960+ 5 Extended
/dev/hda4 * 407 918 2064384 83 Linux
/dev/hda5 * 1 194 782145 83 Linux
/dev/hda6 195 267 294304+ 83 Linux
/dev/hda7 268 340 294304+ 83 Linux
/dev/hda8 341 406 266080+ 83 Linux
A mess I know, but workable. All I have mounted right now is
hda4
with hda1 as the working swap space. Now, what do I do to get my new
linux partitions (hda5-8) formatted as ext2? I know this sounds ignorant,
but I am a bit puzzled. Also, what is the preferred method for copying
whole directories, since I wanna get the entire current contents of /var
and /tmp into hda6&7, and presumably permissions and symlinks gotta stay
absolutely the same?
I understand that once I have the formatting and copying done, I can
update /etc/fstab and
rm -rf /tmp && mount /tmp
or do i need
rm -rf /tmp && mkdir /tmp && mount /tmp
to make the directory where I'm a-gonna mount the new partition?
Many thanks,
Bill
> Depends on which bootloader you're using. If it's lilo, edit
> /etc/lilo.conf so that one of the sections reads boot=<your boot device>
> and run lilo as root.
>
> Realize that lilo can be configured with its boot block on a particular
> partition or in the MBR of the disk. If you want lilo to install in the
> MBR, you've got to give the raw device for the disk (/dev/hda instead of
> /dev/hda[0-9]).
>
>
> Anyway, that's how I'd do things on a home network.
> J.
>
More information about the PLUG
mailing list