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

Re: reclaiming space from redmond!



Kent West wrote:
>>
> 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.
--- snip

hey kent - sorry about that - i used google groups to reply and
mistakenly assumed it would quote.

anyway the basic question of the week was how to reclaim space from a
microsoft partition and yours and robert's responses helped me do that
last night.

for others trying the same thing, here is the gist (statements in
quotes are the commands i ran):

1. i have debian sarge installation dual booted with win xp.
2. winxp is booted from c and i had an extra d: drive with some
documents and stuff.
3. i wanted to make the d drive a linux partition and mount /usr on it
because i was running out of space on my / folder.
4. to begin i found out which device my d: drive was mounted on and it
was /dev/hda5.
5. i backed up all the data on /dev/hda5.
6. "su" (just to be sure that things go ok - not sure if you need to
"su") and go in as root.
6. "mkfs.ext2 /dev/hda5"
7. "mkdir /transient" (create a transient folder)
8. "mount -t ext2 /dev/hda5 /transient"
9. "cp -av /usr/* /transient"
10. then i made the "what-i-thought-was-fatal" flaw: i umounted
/transient and gave "mount -t ext2 /dev/hda5 /usr" !!! as soon as i
pressed enter i realised my mistake(if indeed it was one) - where does
my /usr point now??? is it still the original folder under / which i
was trying to copy to /transient? or does it point to /dev/hda5??? of
course doing "cd /usr" gives no clue since it simply cds to the folder
and "ls" gives me the contents but i had no idea whether this was from
/ or from the newly renamed /transient! (any help on this point would
be appreciated)
11. of course i then realised that i had control over how the devices
would be mounted the next time the system booted - i was root after all
(buwahahahahhhhhaaaaaaaaa!) - so off to /etc/fstab where i specified
that the next reboot should mount /dev/hda5 as /transient again.
12. reboot
13. now i knew which was /usr and which was the copy in /transient.
14. verify that all the files are present in the copy (for the patient,
run "diff -r /usr /transient" and wait an eternity!)
15. now the crucial step before mounting /usr: "rm -rf /usr"
16. "mkdir /usr"
17. now we can happily go "umount /transient" followed by "mount -t
ext2 /dev/hda5 /usr"
18. change /etc/fstab to reflect the fact that /dev/hda5 no more
belongs to windows but to /usr!
19. enjoy the new space on "/"!

thanks!
-prash.



Reply to: