LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 04-26-2004, 02:22 AM   #1
ParticleHunter
Member
 
Registered: Apr 2004
Location: Malaga, Spain
Distribution: LFS
Posts: 129

Rep: Reputation: 15
Just after polishing my LFS 5.0 system... partition question


Hi again,

Right after polishing my brand-new LFS system, I have one question in mind and it's the following...

On my second HDD I have 3 partitions, that's organized as follows:

1 - /dev/hdb1 (swap) 200MB
2 - /dev/hdb2 (LFS) 4.2GB
3 - /dev/hdb3 (KNOPPIX) 3.3GB

And now with the question... I want to erase the KNOPPIX partition and right after doing it, I would like to resize my LFS partition to be able to use the space left by the KNOPPIX partition, but to be honest, I don't know how to do this and I don't know if this can be dangerous... I mean... I just want to augment my partition size without losing any data on the LFS partition...

How can I do this?

Thanks in advance,
Julio

P.D. BTW is my partition setup right? or maybe the swap partition must go at the end of the disk space? what is the 'correct' order?
 
Old 04-26-2004, 04:07 AM   #2
Cerbere
Member
 
Registered: Dec 2002
Location: California
Distribution: Slackware & LFS
Posts: 799

Rep: Reputation: 33
I've heard that there is some software for resizing ext2 filesystems, but I haven't tried any. You could probably find it at http://www.google.com or http://www.google.com/linux.

Another, and safer idea would be to use the extra partition for /home. In fact, you may want to migrate the LFS to hdb3, then reduce the size of hdb2, then move LFS back to hdb2, and finally recreate hdb3 to use all the spare space and use it as /home.

As for your swap, there are different theories on this. Some say that the swap partition should be first, since the smaller sectors at the inside of the disk can be read faster. Others say that it should be in the middle to reduce overall travel of the reading head as it moves back and forth from your swap to your data. Personally, I don't think you'll notice the difference without running some sort of benchmarking program.

Enjoy!
--- Cerbere
 
Old 04-26-2004, 06:26 AM   #3
ParticleHunter
Member
 
Registered: Apr 2004
Location: Malaga, Spain
Distribution: LFS
Posts: 129

Original Poster
Rep: Reputation: 15
About partition resizing and /swap theory

Hi,

I'll probably support the first theory, having the swap partition in the first sectors of the disk could maybe result useful for fast disk reading...

And regarding the 'partition procedure'... naw, I think i'll try your suggestion... I'll try to find any ext2 partition resizer and see if it works... because i just want my LFS partition resized and all LFS system and directories in ONLY one partition. Maybe a relatively easy solution for this could be booting my system from a windows partition and using some software like... partition magic or similar, but the ideal solution for me would be not having to come to windows for help :P

Thanks anyway for the answer,
Julio
 
Old 04-26-2004, 06:43 AM   #4
ParticleHunter
Member
 
Registered: Apr 2004
Location: Malaga, Spain
Distribution: LFS
Posts: 129

Original Poster
Rep: Reputation: 15
Oh, seems I've found a good candidate, that's the GNU parted utility... it seems enough robust for deleting the KNOPPIX partition and resizing my LFS partition without losing data

Thanks for the advice, pal ^_^
 
Old 04-27-2004, 03:00 AM   #5
Cerbere
Member
 
Registered: Dec 2002
Location: California
Distribution: Slackware & LFS
Posts: 799

Rep: Reputation: 33
Please post back to let me know how it works out. I've been wondering about it, but never really wanted to take the risk.

And yeah, my swap partition is the first on my disk, too ;-)

Enjoy!
--- Cerbere
 
Old 04-27-2004, 04:51 AM   #6
ParticleHunter
Member
 
Registered: Apr 2004
Location: Malaga, Spain
Distribution: LFS
Posts: 129

Original Poster
Rep: Reputation: 15
OK, i'll let you know when I'm done with it, probably on Friday, for now I have to work work work

Julio
 
Old 04-27-2004, 04:52 AM   #7
ParticleHunter
Member
 
Registered: Apr 2004
Location: Malaga, Spain
Distribution: LFS
Posts: 129

Original Poster
Rep: Reputation: 15
oops, pressed the send button twice

Last edited by ParticleHunter; 04-27-2004 at 04:54 AM.
 
Old 04-29-2004, 04:41 PM   #8
linuxnut2003
Member
 
Registered: Nov 2003
Location: Oklahoma, USA
Distribution: gentoo
Posts: 73

Rep: Reputation: 15
another way to do this is to back up your data to a cd and resize and format that way
 
Old 05-02-2004, 11:28 AM   #9
ParticleHunter
Member
 
Registered: Apr 2004
Location: Malaga, Spain
Distribution: LFS
Posts: 129

Original Poster
Rep: Reputation: 15
SUCCESS!!

to Cerbere:

sorry for the delay, had some things to do in order to be able to test the GNU parted utility

yeah, it worked! now everytime I setup a host system for building an LFS-type system, i'll be able to get rid of the host

it worked very well, very good interface, simple but efficient, fast and reliable

to linuxnut2003:

naw, the idea within my question was a method for just resizing the partition and NOT having to do some sort of a tricky procedure like many of you suggested to me, at least I consider that methods 'tricky' just by the fact they're not 'simple', and I think GNU parted fits the purpose very well. That's what I call an 'elegant and simple' solution, but thanks for the advice, it's wellcome
 
Old 05-03-2004, 08:51 AM   #10
linuxnut2003
Member
 
Registered: Nov 2003
Location: Oklahoma, USA
Distribution: gentoo
Posts: 73

Rep: Reputation: 15
you're quite welcome i think i will look at gnu's parted myself to see if i might have some uses for it
 
Old 05-03-2004, 10:20 AM   #11
ParticleHunter
Member
 
Registered: Apr 2004
Location: Malaga, Spain
Distribution: LFS
Posts: 129

Original Poster
Rep: Reputation: 15
yeah, quite good tool... it impressed me at the first time
 
Old 05-03-2004, 10:54 PM   #12
Cerbere
Member
 
Registered: Dec 2002
Location: California
Distribution: Slackware & LFS
Posts: 799

Rep: Reputation: 33
Thanks for posting your results, ParticleHunter. I'll probably start playing with parted on one of my old boxes, just to get the hang of it.

Enjoy!
--- Cerbere
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Building an LFS system from another system z3r0star21 Linux From Scratch 6 11-08-2005 03:13 AM
vfat partition does not mount on lfs logicalfuzz Linux From Scratch 1 09-02-2005 11:12 AM
LFS 6.1 - a question on SWAP partition satimis Linux From Scratch 12 07-18-2005 08:08 AM
First LFS system Tez218 Linux From Scratch 1 10-25-2003 12:07 AM
Your LFS system mediab0x Linux From Scratch 3 07-14-2003 05:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 01:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration