Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Installing Gentoo
  • Search

moving house: enlarging the root FS

Having problems with the Gentoo Handbook? If you're still working your way through it, or just need some info before you start your install, this is the place. All other questions go elsewhere.
Post Reply
Advanced search
8 posts • Page 1 of 1
Author
Message
nivw
Apprentice
Apprentice
Posts: 261
Joined: Wed Nov 09, 2005 2:07 am

moving house: enlarging the root FS

  • Quote

Post by nivw » Wed Feb 01, 2006 4:52 pm

Hi,
I want to add 10G from a ext3 partiotin mounted as /home , to reser4 /
I have had bad expirince with repartioning using linux cfdisk as well as fdisk.
1. DID anyone here changed the partition table using fdisk then ran Partition magic - to discover all the disk appear in yellow = invalid partition table ?
2. I assume I can define the partitons in partition magic, thus avoid using fdisk, but then how may I enlarge the reiser4 partition ?
3. can I just attach a second disk , create a same size partition as / and copy
cp -rf /.* /sec_disk
it all over to the second disk , then repartition using PM?

Niv
Top
!equilibrium
Bodhisattva
Bodhisattva
User avatar
Posts: 2109
Joined: Sun Jun 06, 2004 5:05 pm
Location: MI/BG/LC
Contact:
Contact !equilibrium
Website

  • Quote

Post by !equilibrium » Wed Feb 01, 2006 5:46 pm

i'm not sure, but a reiserfs4 partition cannot be enlarged.
Arch Tester for Gentoo/FreeBSD
Equilibrium's Universe

all my contents are released under the Creative Commons Licence by-nc-nd 2.5
Top
linuxtuxhellsinki
l33t
l33t
User avatar
Posts: 700
Joined: Mon Nov 15, 2004 1:56 pm
Location: Hellsinki

  • Quote

Post by linuxtuxhellsinki » Wed Feb 01, 2006 7:03 pm

I think that copying to the another disk and back is the best way, maybe something like

Code: Select all

cp -ax /* /sec_disk/
Make it via LiveCD, cause then there's nothing changing on the disk. And you'd exclude some proc & tmp -dirs.

I wouldn't use PM to anything, there's also those graphical partition managers for Linux like gparted etc... :?
1st use 'Search' & lastly add [Solved] to
the subject of your first post in the thread.
Top
Sainted_Trousers
n00b
n00b
User avatar
Posts: 42
Joined: Sun Nov 27, 2005 8:44 am

  • Quote

Post by Sainted_Trousers » Wed Feb 01, 2006 7:34 pm

It's been my experience that filesystems don't like to have their partitions changed. It's best to copy everything over to a spare
partition, as you suggested, and copy everything back over after re-partitioning (I would re-format, too - if there were any errors
in the filesytem before the re-partitioning, that would fix them). You should re-configure grub afterwards, if you don't have a se-
parate boot partition (and maybe even if you do) just to make sure. As for the copy command, I would use

Code: Select all

cp -ax /* /sec_disk
The 'x' option needs some explanation. If you don't use it, then cp will dump a bunch of files into /sec_disk, and then try to
copy the contents of /sec_disk into itself, thus causing a catastrophic tear in subspace. So you'll have to manually copy each
partition separately into the appropriate subdirectories in /sec_disk. Then be prepared to re-install because your sacrifice was
not worthy.

I've never had fdisk do anything I didn't tell it to do (I've told it to do dumb things before), but I have heard bad things about
Partition Magic. Forget hearsay, though. I would trust fdisk before I'd trust Partition Magic just on general principles - it's
smaller, it does one thing very well, and the code is more mature. I prefer smaller, less complex software when I have a choice.
YMMV, of course.

EDIT: Hmm, hellsinki stole my thunder with the cp command.
Top
chris_andrew
Apprentice
Apprentice
User avatar
Posts: 291
Joined: Sun Sep 19, 2004 6:52 pm
Location: Wiltshire, UK

  • Quote

Post by chris_andrew » Thu Feb 02, 2006 1:14 pm

Does this help?

http://www.gentoo.org/doc/en/articles/p ... ing-p1.xml

Cheers,

Chris.
Top
nivw
Apprentice
Apprentice
Posts: 261
Joined: Wed Nov 09, 2005 2:07 am

  • Quote

Post by nivw » Wed May 03, 2006 2:19 am

updated scenerio:
I boot off the / I want to move from hda7 -> hde5
if I run cp -ax / /mnt/backup
It is stuck at /proc somthing
can I exclude folders in this recursive copy?
Top
Rodent
Tux's lil' helper
Tux's lil' helper
Posts: 81
Joined: Sat Sep 06, 2003 8:46 am
Location: Noblesville, Indiana

  • Quote

Post by Rodent » Wed May 03, 2006 10:31 am

Just a FYI for all who care.

To expanding a partition is trivial in linux. However if it goes south so does your data. There are a couple of popular options I will summarize. They both do the same thing.
1 - Use GNU parted

Code: Select all

# parted /dev/hda
# resize 
2 - Use the any partition tool and then have the FS expand or contract. Obviously reverse steps to go smaller.

Code: Select all

# fdisk /dev/hda
- delete partition then remake it with the _same_ starting sector but new size -
# resize_reiserfs -s +10G /dev/hda
Hope that helps! And remember to RTFM before doing serious stuff like this.

as for your cp command it should work, however you could try

Code: Select all

cp -a /bin /boot /dev /etc /home /lib /mnt /root /sbin /tmp /usr /var /mnt/backup
Top
nivw
Apprentice
Apprentice
Posts: 261
Joined: Wed Nov 09, 2005 2:07 am

  • Quote

Post by nivw » Wed May 03, 2006 12:12 pm

just for the record I did this:
cp -avx /bin /dev /etc /home /lib /mnt /root /sbin /tmp /usr /var /backup /boot /data /opt /mnt/backup
Top
Post Reply

8 posts • Page 1 of 1

Return to “Installing Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic