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

Re: partition types



On Wed, Feb 06, 2002 at 09:56:34PM -0600, burningclown@westhost43.westhost.net wrote:
> 
> OK, I've got a REALLY STUPID question here. :/

there are no stupid questions, only stupid answers :)

> I decided recently that I wanted to try out the "Linux from Scratch" 
> project (http://www.linuxfromscratch.org). In order to do this particular 
> thang one has to create a reasonable sized partition on which to create 
> the installation. 
> 
> Now, when =I= go into my /dev/hda with GNU parted, or fdisk, or what have 
> you, what do I see? That's right, 4 primary partitions: the max you can have. 
> 
> Dumb question is: can I change my root partition to type extended and 
> create two logical partitions (one holding the original root stuff, the 
> other for Linux from Scratch things) within it? Without destroying my 
> beloved Debian system?
> 
> Or does it just not work that way?

Well, it might be kinda tricky ;) and you might loose all your data....

<my little adventure>

A few days ago I wanted to merge some partitions so that I could use
my disk space a bit more efficiently. I had something like this:

/dev/hda1     /boot     start-16 meg on drive
/dev/hda3     /         16M - 400M
/dev/hda2     /vat      400M-512M

What I did was go to cfdisk, deleted /dev/hda3 and /dev/hda2, created a new
/dev/hda2 [all disk space except for boot]. Then I modified /dev/fstab and
/dev/lilo.conf so that my root partition will be on /dev/hda2 not hda3...
I copied e2resize program (ext2resize) to /dev/boot...

run lilo

Make 2 boot dists (rescue and root from potato - BTW, I'm running woody).

Rebooted with rescue in floppy mode. Went to shell :)

Mounted /dev/hda2 on some directory to see if it is still there - worked!!
so I unmounted the /dev/hda2 and run e2resize on it... Worked fine... 
[phew at this point - apparently e2resize will run with libc from potato!]

didn't loose my data :)

</my little adventure>

You can use e2resize to shrink partitions as well. Please read documentation
that comes with it.. But then it only works on ext2 fs...

If you change anything, be prepared to loose data... Sometimes you are lucky and
sometimes it blows up in your face..

- Adam



Reply to: