Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Unsupported Software
  • Search

Going 4K - SOLVED (for now)

This forum covers all Gentoo-related software not officially supported by Gentoo. Ebuilds/software posted here might harm the health and stability of your system(s), and are not supported by Gentoo developers. Bugs/errors caused by ebuilds from overlays.gentoo.org are covered by this forum, too.
Post Reply
Advanced search
15 posts • Page 1 of 1
Author
Message
Guinpen
Guru
Guru
User avatar
Posts: 393
Joined: Wed Dec 08, 2004 1:18 pm
Contact:
Contact Guinpen
Website

Going 4K - SOLVED (for now)

  • Quote

Post by Guinpen » Sat Jun 25, 2005 9:55 am

With the release of 2.6.12, my sweet old 2.6.11-love2 has been deprecated :). I've decided to switch to 2.6.12, and go fully 4K stacks in the process. Now, the problem is that I have a root partition with reiser4... that's going to have to become ext3 I guess. The only way to do it, I've been told, is to copy the data somewhere, kill the partition, make a new etx3 partition, and copy back.

Sounds too simple though. What about virtual filesystems (e.g. /proc), permissions and the like? What commands should I use to do the copying? I'd go with something like "tar -cpf blah.tar /", remove reiser4, create ext3, "tar -xpf blah.tar /". Will that work?
Last edited by Guinpen on Sun Jun 26, 2005 6:47 pm, edited 1 time in total.
Top
bonbons
Apprentice
Apprentice
Posts: 250
Joined: Sat Sep 04, 2004 4:09 pm

  • Quote

Post by bonbons » Sat Jun 25, 2005 10:10 am

If you have space enough, I would just create the new ext3 partition, mount --bind / somewhere else (so you don't need to worry about all other filesystems mounted on your /)

The cp -a /mnt/rootbind /mnt/newroot

As a final step, you will need to adjust your bootloader in new root fs.
Top
Guinpen
Guru
Guru
User avatar
Posts: 393
Joined: Wed Dec 08, 2004 1:18 pm
Contact:
Contact Guinpen
Website

  • Quote

Post by Guinpen » Sat Jun 25, 2005 10:34 am

I don't have that much space. I have some free space which is on another ext3 partition (where I keep my data), so I was thinking to tar / up and put that on the ext3, and then restore.

Does tar have anything equivalent to cp's -a option?
Top
bonbons
Apprentice
Apprentice
Posts: 250
Joined: Sat Sep 04, 2004 4:09 pm

  • Quote

Post by bonbons » Sat Jun 25, 2005 10:43 am

Godji wrote:I don't have that much space. I have some free space which is on another ext3 partition (where I keep my data), so I was thinking to tar / up and put that on the ext3, and then restore.

Does tar have anything equivalent to cp's -a option?
Tar does it automatically, but you need to use the mount --bind trick as I'm not sure it is able to ignore mounts... (nota that cp's -a option does not take care of mounts either)
cp -a and tar will preserver ownership, device files and everything. (if you run from a livecd then you probably don't have to worry about the mounts, but on running system you have to)
Top
Guinpen
Guru
Guru
User avatar
Posts: 393
Joined: Wed Dec 08, 2004 1:18 pm
Contact:
Contact Guinpen
Website

  • Quote

Post by Guinpen » Sat Jun 25, 2005 3:48 pm

I tried tar, but it had some sort of problem (started giving stat errors after a while). So I ended up using cp, and it copied everything except hidden files (such as .bash_profile). How can I make cp do that? I couldn't find it the man page.
Top
bonbons
Apprentice
Apprentice
Posts: 250
Joined: Sat Sep 04, 2004 4:09 pm

  • Quote

Post by bonbons » Sat Jun 25, 2005 3:54 pm

Godji wrote:I tried tar, but it had some sort of problem (started giving stat errors after a while). So I ended up using cp, and it copied everything except hidden files (such as .bash_profile). How can I make cp do that? I couldn't find it the man page.
cp does copy them if they are in sub-directories or on the command line.

For what files did tar complain?
Top
FGA
Apprentice
Apprentice
User avatar
Posts: 179
Joined: Wed Apr 07, 2004 3:13 pm

  • Quote

Post by FGA » Sat Jun 25, 2005 4:04 pm

bonbons wrote:
Godji wrote:I don't have that much space. I have some free space which is on another ext3 partition (where I keep my data), so I was thinking to tar / up and put that on the ext3, and then restore.

Does tar have anything equivalent to cp's -a option?
Tar does it automatically, but you need to use the mount --bind trick as I'm not sure it is able to ignore mounts... (nota that cp's -a option does not take care of mounts either)
cp -a and tar will preserver ownership, device files and everything. (if you run from a livecd then you probably don't have to worry about the mounts, but on running system you have to)
Does ls's and tar's "--one-file-system" option do the same as the "mount --bind" trick?

EDIT: does the nvidia binary module work with 4k stacks?
Top
bonbons
Apprentice
Apprentice
Posts: 250
Joined: Sat Sep 04, 2004 4:09 pm

  • Quote

Post by bonbons » Sat Jun 25, 2005 4:13 pm

FGA wrote:Does ls's and tar's "--one-file-system" option do the same as the "mount --bind" trick?
Yes, but with a small exception, you won't get files in folders with something mounted above them (e.g. boot-time devices under /dev/ where udev or devfs is mounted later during boot-time) So mount --bind still has a small advantage...

e.g. if you use udev and tar --one-file-system your root, then you will miss /dev/null and such that are present on root partition for very beginning of boot process
FGA wrote:EDIT: does the nvidia binary module work with 4k stacks?
If I remeber well recent versions should be 4k Stack compatible... just read the README that comes with the driver package :-)
Top
frenkel
Veteran
Veteran
User avatar
Posts: 1034
Joined: Tue May 13, 2003 5:08 pm
Location: .nl
Contact:
Contact frenkel
Website

  • Quote

Post by frenkel » Sat Jun 25, 2005 4:44 pm

Godji wrote:I tried tar, but it had some sort of problem (started giving stat errors after a while). So I ended up using cp, and it copied everything except hidden files (such as .bash_profile). How can I make cp do that? I couldn't find it the man page.
First thing: don't try it on a "running" system. Boot with a livecd and mount your hd's (not /sys, /proc or /dev).
Then run the following command: tar -cjvpf backup.tar.bz2 /mnt/gentoo
This will backup everything in the map /mnt/gentoo, with bz2 compression and preserving permissions. Extract it like this:
tar -xjvpf /mnt/backup/backup.tar.bz2

Good luck,
Frank
Top
grenouille
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 97
Joined: Sat Jun 12, 2004 6:45 pm

  • Quote

Post by grenouille » Sun Jun 26, 2005 12:58 am

erm, if you do that from a live cd, you can do it with cp -a
no need for tar or compression

I did it a few times to test filesystems and never had any problem
Top
Guinpen
Guru
Guru
User avatar
Posts: 393
Joined: Wed Dec 08, 2004 1:18 pm
Contact:
Contact Guinpen
Website

  • Quote

Post by Guinpen » Sun Jun 26, 2005 8:15 am

So I did it with tar and bzip compression:

Code: Select all

tar -cjvpf /mnt/data/root.tar -C /mnt/root .
...
tar -xjvpf /mnt/data/root.tar -C /mnt/root
It worked, but my system has some problems now. When it boots, it gives me some messages, such as:

Code: Select all

Skipping /var/run/utmp initialization (ro root?)
and

Code: Select all

Skipping /var and /tmp initialization (ro root?)
and

Code: Select all

No automount maps defined
and

Code: Select all

Error initializing random number generator
Although I had kdm start at boot, now it won't, althogh startx then works. Many executables would not run (they print a blank line and hang), but I fixed that with giving /var and /tmp recursively full permissions. I also tried deleting those folders. In the syslog, it says that many apps can't create/lock pid files.
What's going on?
Top
frenkel
Veteran
Veteran
User avatar
Posts: 1034
Joined: Tue May 13, 2003 5:08 pm
Location: .nl
Contact:
Contact frenkel
Website

  • Quote

Post by frenkel » Sun Jun 26, 2005 9:58 am

Are you sure you used the p option? I had the same problem when I forgot to preserve permissions. Never had any problems when I used -p though...
Top
Guinpen
Guru
Guru
User avatar
Posts: 393
Joined: Wed Dec 08, 2004 1:18 pm
Contact:
Contact Guinpen
Website

  • Quote

Post by Guinpen » Sun Jun 26, 2005 10:12 am

I'm sure I used it both during compression and extraction. I did delete the /tmp and the /var/tmp folder before starting, as well as /usr/portage/distfiles, in order to conserve disk space and time. But the damage is already done, and I want to avoid reinstalling Gentoo (think KDE...)
Top
frenkel
Veteran
Veteran
User avatar
Posts: 1034
Joined: Tue May 13, 2003 5:08 pm
Location: .nl
Contact:
Contact frenkel
Website

  • Quote

Post by frenkel » Sun Jun 26, 2005 3:29 pm

Try this:

Code: Select all

# rm -rf /tmp
# mkdir /tmp
# chmod 1777 /tmp
# chown root:root /tmp
# chown root:root /var
This will hopefully solve some stuff, but not everything I guess. Can you give us the output of "ls -al /" and "ls -al /var"

Frank
Top
Guinpen
Guru
Guru
User avatar
Posts: 393
Joined: Wed Dec 08, 2004 1:18 pm
Contact:
Contact Guinpen
Website

  • Quote

Post by Guinpen » Sun Jun 26, 2005 6:46 pm

I'd love to, but I just decided to reformat and reinstall. I'm currently bootstrapping :P

Yeah I know it's a Windows habit, but I did use it a lot before I switched to Gentoo.

Thanks for your help.
Top
Post Reply

15 posts • Page 1 of 1

Return to “Unsupported Software”

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