On Mar 24, 2008, at 10:31 PM, Marius Meinert wrote:
> I got an idea regarding your partitioning system, but I didn't test
> this out, so just see it as a concept and read it carefully before
> using this way. Or even better, wait for replies if it works and don't
> use it^^.
>  If you want to have a fewer amount of partitions without
> reinstalling debian, you might copy the
> data of one partition onto root (/) and the  delete this one, don't
> forget to delete the partition from your fstab after that.
> If you want to move your /usr to / for example, you would just insert
> a livecd, so that your system can use an own /usr and then mount
> your /. Then you would create a directory on that partition called
> usr. After that just copy over all data from the /usr partition to the
> usr in /.
> mkdir /mnt/debianroot
> mkdir /mnt/debianusr
> mount /dev/hda2 /mnt/debianroot
> mount /dev/hda5 /mnt/debianusr
> mkdir /mnt/debianroot/usr
> cp /mnt/debianusr/* /mnt/debianroot/usr/
> fdisk /dev/hda
> d
> 5
> w
> q
> nano /mnt/debianroot/etc/fstab
> remove the line /dev/hda5...
> reboot

I've tested this out in a VM with debian etch and the lfs live cd. I  
created /dev/hda1 as / and /dev/hda5 as /usr.
The above command listing seems to work for this setup, although it  
needs some changes. You don't have to create the usr directory on /,  
as it is already there. When you copy the data from the hda5 usr to  
the hda1(hda2 in your case) /usr, you have to add the -r argument to  
the cp command. This argument causes cp to recursively copy data, so  
that it also copies directories.
Once you settled over some partitions to your main root partition you  
might want to maximize this one, otherwise you would have as much  
space available for your whole debian system as you had for the /  
partition before.
Maximizing should work with the partitioning tool cfdisk, but I  
haven't ever done this, so I can't help you out here. Remember that  
the blocks on a hard drive are ordered linear, this means, you can  
only maximize a partition, if there are free blocks following the  
partition you want to maximize.
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to