Deleting partitions and renumbering

Ken Moffat ken at kenmoffat.uklinux.net
Thu Jul 29 15:59:47 PDT 2004


On Thu, 29 Jul 2004, S. Anthony Sequeira wrote:

> I want to reorganise the partitions on my desktop.  I'm preparing for
> another LFS build.
>
> I have several useless partitions I want to get rid of.
>
> I believe that deleting partitions (primary or logical) will renumber
> the following partitions, am I right?
>

 Deleting primary partitions will NOT renumber logical partitions -
those always start at 5 in a dos partition table.  I've never tried
deleting logical partitions, other than removing from the end backwards.

> I also use LVM, which further complicates matters.
>
> I just want to make sure that I won't mess up my current LFS
> installation, if you see any problems please give me a shout.
>
> What I propose doing:
>
> Boot from a knoppix drive.
>
> Mount my current installation.
>
> tar it to an NFS mounted drive.
>

 no_root_squash for this case, I presume.

> cd /mnt/curr && tar cvjf *
>
> (No dotfiles in the root partition)
>
> Unmount /mnt/curr (and associated LVs)
>
> Trash the LVs, VGs and partitions and recreate the partitions I want.
>
> Recreate the VG I require.  (Gotta make sure knoppix handles LVs).
>
> Recreate the LVs I require.
>
> mount the newly created partitions and LVs.
>
> tar copy back
>
> cd /tar xvjpf - --same-owner
>

I guess that's a typo for

cd / ; tar ...

- if so, I'd be cautious about extracting a rootfs into '/', even if all
it overwrites is knoppix.  Probably safer to mount desired rootfs at
/mnt/new or wherever and cd /mnt/new.  Which means mounting the other
LVs at /mnt/new/home or wherever instead of at /home.

> Edit fstab accordingly.
>

 And therefore edit /mnt/new/fstab,

> Reboot.
>
> Is this OK?
>

Ken
-- 
 das eine Mal als Tragödie, das andere Mal als Farce




More information about the lfs-chat mailing list