[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: reclaiming space from redmond!



prash wrote:

ok i have cleared my d: drive and am ready to format it to ext2.

a current "df" gives:

mantra:~# df -hT
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/hda8     ext2    3.8G  3.5G  151M  96% /
tmpfs        tmpfs    189M     0  189M   0% /dev/shm
/dev/hda6     ext2     45M  5.3M   37M  13% /boot
/dev/hda1     ntfs    6.9G  6.2G  657M  91% /mnt/c
/dev/hda5     vfat    7.8G  301M  7.5G   4% /mnt/d
/dev/hdb1     vfat     28G   21G  7.1G  75% /mnt/g
/dev/hdb5     vfat     28G   23G  5.0G  83% /mnt/h
/dev/hdb6     vfat     28G   15G   14G  52% /mnt/i
/dev/hdb7     vfat     31G   25G  6.6G  79% /mnt/j
/dev/hdc   iso9660    4.4G  4.4G     0 100% /media/cdrom0

i just have a quick follow-up question:
Except that a lot of traffic flows by on this list, and as surprising as it might be to you, you probably didn't make a big enough impression on us for us to remember any previous posts/issues/questions/details you've provided. I know I don't remember those things. And whereas I could go search the archives for your name and/or this thread, I'm not going to. So I'm going to be making assumptions about your setup as I go.

once i create a linux (ext2) partition of /dev/hda5 (my old d: drive)
can i further partition /dev/hda5 into two because i want to move both
/usr and /home to it (8gb is too much for /usr alone and i expet a lot
of mails, docs and apps in my /home!)?

do i need to specifically mount /usr and /home to the new partition
(/dev/hda5) or is it enough if i just "mv" the folder and change fstab
settings. can one have two folders (/usr and /home mounted on the same
/dev/hda5 - if not then how to partition further to make it happen?)
What are you going to do with /dev/hdb[1,5-7]? Just curious. And in case you didn't know, with Linux, you're not limited to staying on one drive for your partitions. I also wonder what happened to /dev/hda7.

Assuming you're only giving /dev/hda5 over to Linux ...

1) Use "cfdisk" to open a nice little partitioning tool on the /dev/hda disk (it'll default to /dev/hda; other tools, like Linux's "fdisk" expect you to specify the disk, and if you want to partition some other disk with "cfdisk", you'd need to specify the disk, like "cfdisk /dev/hdb").

2. Delete /dev/hda5; if you have data on this partition, and haven't backed it up, you'll lose it forever. But you've said you've cleared it, so you should be good to go.

3. Create a new (/usr) partition in the /dev/hda5, making it smaller than the original, since you're going to make two partitions out of it.

4. With the remaining blank space, create your /home partition; be aware that the partition numbers may be out of order, or it may be that you can't even use this blank space because of partition numbers; I can't recall what might issues might arise. Be aware that if partition numbers change, you'll need to reflect that change in the /etc/fstab file later.

5. Write the changes to disk, and exist cfdisk.

6. Create an ext2 (I'd suggest ext3) file system on these partitions: "mkfs.ext2 /dev/hda[5?]" and "mkfs.ext2 /dev/hda[7?]]".

7. Mount the first partition on a temporary mount point: "mkdir /target"; "mount /dev/hda[5?] /target"

8. Copy over the files from your existing /usr directory: "cp -av /usr/* /target"

9. Unmount your existing /usr and your /target directories: "umount /usr", "umount /target".

10. Update /etc/fstab so that /dev/hda[5?] is now your /usr directory; mount the new /usr: "mount /usr".

11. Repeat Steps 7-10, only using /dev/hda[7?] and /home.


This assumes you already have a functioning Debian system, and are just moving things around. If you have not even installed Debian yet, (perhaps you used Knoppix, etc, to get your "df" output above, and the ext2 partitions are things you've experimented with). If you haven't yet installed Debian, some of the above steps will be taken care of during the installation.

any help would be much appreciated - i am becoming savvy with linux but
partitions still scare me!

Just a reminder; partitions are not Linux-specific; every OS I've ever used has to have a disk partitioned; it's just that Windows has always assumed the partitions would belong to Redmond, so didn't give you a whole lot of choices in the matter.

Rearranging partitions is always much more difficult than getting them right the first time around. That's why I was eyeing /dev/hdb above; if your Windows setup doesn't need the G:, H: I:, and J: drives (partitions), you could blow them away and use /dev/hdb for your Debian setup, and not mess with potentially damaging your main Windows partition. That way you could start with a "clean" drive instead of having to "cut and paste" partitions on a drive with existing data.


--
Kent



Reply to: