Stuck on step number one

Jeffrey B. Ferland autocracy at linuxfreemail.com
Wed Jan 17 17:03:12 PST 2001


Carol Spears wrote:
> 
> I joined this list this afternoon.
> 
> Two questions.
> 
> My brother made me frightened to make a new partition.  He said that
> when I rebooted, it would format over what I have.  Can you put his
> fears to rest.
> 
> The second question, is there an archive of the mail from this list as I
> am quite the luser and would like to look up old mail as I need it.
> 
> Also, about "leaving linux".  My dad has had a heck of a time getting
> off from windows and onto linux because he doesn't know how to type real
> well. I'll bet your troll can't type.

OK, for the sake of totally confusing those of you reading this list in threaded
mode, and because I can't find one e-mail to reply to, here we go from the top
:)

You've already got your second question answered, so let's shoot for a easy
answer for the first. If you feel at all queasy or believe that your files are
important in any way, back them up. You're already doing that you said, so next
step. Since you have only one partition, you can't do the resize "live". That
means not bringing the computer down at all... You're going to have to make a
boot disk and boot off of that. Have the ext2resize program on there (gnuparted
is now stable and supports this as well, but since it wasn't when I did this,
I'm going to ignore it). as well as FDISK. Check the size of the filesystem, and
the blocks on the partition. WRITE THEM DOWN!

Resize the partition to a little more than the used space (whatever you think is
right), and then mount it and run the 'df' command. Note the size of the
filesystem now (total, not free or used. Also - you will see that the amount
used is now LESS than before. This is because you now have a smaller inode
table), and get ready to do some math. $FS_SIZE1=original filesystem size
$FS_SIZE2=new filesystem size $BLOCKS=number of blocks used in the partition. I
suggest using megabytes for the filesystem sizes. Whatever you do, be sure you
use the same for both. Now, do the following: $FS_SIZE1/BLOCKS=$NUMBER,
$FS_SIZE2/$NUMBER=$BLOCKS_TO_USE. Round UP your answers to a whole number in
both equations. Better safe than sorry! Now use FDSIK to resize the partition to
$BLOCKS_TO_USE blocks. Your partition will now be a little larger than your
filesystem. Use ext2resize again to make the filesystem as big as it can be.
You're now done. Reboot and enjoy your new smaller partition and filesystem!

I AM NOT RESPONSIBLE IF THIS GOES BAD!

-Jeff
SIG: HUP

-- 
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message




More information about the lfs-dev mailing list