View previous topic :: View next topic |
Author |
Message |
remix l33t
Joined: 28 Apr 2004 Posts: 797 Location: hawaii
|
Posted: Sat Jun 13, 2009 8:52 pm Post subject: Re-Install help ? |
|
|
I have 2 machines, both have not bee updated in many months.
I'm getting so many errors now that it might make more sense just to reinstall everything.
(errors for one machine being can't compile expat, and i removed it, so when i reboot, i'm pretty sure everything will be broken, and in the other, i can't compile busy-box, can't revdep-rebuild, etc.)
I've been up for the past 12 hours (instead of sleeping) trying to get each little problem (non emerging packages) fixed, I think it would make more sense just to reinstall starting with an entirely fresh updated system.
so here is what i think i have to do. (for each box)
- backup configs, everything in /etc
- backup the world file, so i know what i had installed
- probably want to backup /usr/share/*
- backup /usr/src/linux/.config (although i keep a backup in /boot anyway)
- have some stuff in /opt, but i think it's safe to delete all that and let it merge back in right?
is there anything else that i should backup before formatting the root partition?
- boot up using a livecd
- format root partition
- unpack stage tarball into root
- chroot and continue standard install
?
does this sound correct?
also, i'm thinking of moving over to kde from gnome because gnome-system-manager is broken, and it looks like no one wants to fix it.
tia _________________ help the needy |
|
Back to top |
|
|
vaxbrat l33t
Joined: 05 Oct 2005 Posts: 731 Location: DC Burbs
|
Posted: Sun Jun 14, 2009 12:20 am Post subject: I just redidi my laptop |
|
|
I captured /etc/conf.d and /home and my old grub.conf and that was pretty much it. I ended up repartitioning so redid the fstab.
Before you start over from scratch... did you try doing an "emerge -e system" to get a somewhat stable toolchain? I've let systems slack for 6 months and always managed to muddle through with a couple of those followed by an emerge -uD --newuse world. The only reason I slicked the laptop was that I wanted to move to ext4 and go from hardened selinux profile to a normal one. |
|
Back to top |
|
|
RedSquirrel Guru
Joined: 22 Apr 2008 Posts: 336
|
Posted: Sun Jun 14, 2009 1:04 am Post subject: |
|
|
I create a tarball of the whole /etc tree just to be sure I've got everything. It's not very big anyway.
I wouldn't care much about /usr/share and /opt.
If you have any custom files under /root, you might want to save those too.
Don't forget to mount the other partitions (e.g., /boot and /home) prior to extracting the stage3. |
|
Back to top |
|
|
remix l33t
Joined: 28 Apr 2004 Posts: 797 Location: hawaii
|
Posted: Sun Jun 14, 2009 2:25 am Post subject: Re: I just redidi my laptop |
|
|
vaxbrat wrote: | I captured /etc/conf.d and /home and my old grub.conf and that was pretty much it. I ended up repartitioning so redid the fstab.
Before you start over from scratch... did you try doing an "emerge -e system" to get a somewhat stable toolchain? I've let systems slack for 6 months and always managed to muddle through with a couple of those followed by an emerge -uD --newuse world. The only reason I slicked the laptop was that I wanted to move to ext4 and go from hardened selinux profile to a normal one. |
actually i've been waiting for a response from this thread for a couple hours, and in that time i ran an emerge -e system and fell asleep. when i woke up emerge finished now it looks like i can get a sane system back.
RedSquirrel wrote: | create a tarball of the whole /etc tree just to be sure I've got everything. It's not very big anyway.
I wouldn't care much about /usr/share and /opt.
If you have any custom files under /root, you might want to save those too.
Don't forget to mount the other partitions (e.g., /boot and /home) prior to extracting the stage3. |
thanks for the advice, i'm now confident if i have to go that route. but why would i need to mount /boot and /home before extracting the stage3 tarball again? _________________ help the needy |
|
Back to top |
|
|
RedSquirrel Guru
Joined: 22 Apr 2008 Posts: 336
|
Posted: Sun Jun 14, 2009 3:28 am Post subject: Re: I just redidi my laptop |
|
|
remix wrote: | thanks for the advice, i'm now confident if i have to go that route. but why would i need to mount /boot and /home before extracting the stage3 tarball again? |
That's to ensure everything ends up where it's supposed to. The stage3 tarball has .keep files for /home and /boot, as well as a symlink for /boot (that points to itself). You want those on the partitions, not under the boot and home directories on /.
You already have those .keep files and the boot symlink on your existing partitions. If you don't mount the /boot and /home partitions prior to extracting the tarball, you could just delete them [edit: I mean the .keep files and symlink, not the partitions] from the boot and home directories on /. Whatever works for you.
Of course, you'll need /boot mounted for installing the kernel there later on, so why not mount it sooner, rather than later? |
|
Back to top |
|
|
remix l33t
Joined: 28 Apr 2004 Posts: 797 Location: hawaii
|
Posted: Sun Jun 14, 2009 12:29 pm Post subject: |
|
|
ahh thanks squirrel!
i didn't know that that happens. i'll remember to do that from now on.
so what are those .keep files and symlinks for?
and why is it bad if home and boot on / (instead of the mounted partitions) have them?
the /home and /boot partition already have them, so when they are mounted, isn't the home and root directories on / not read anymore, i thought it shouldn't matter if it has anything in there. _________________ help the needy |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22684
|
Posted: Sun Jun 14, 2009 4:35 pm Post subject: |
|
|
The .keep files are a hack to force the directories to exist. The symlink in /boot is so that you can use a grub.conf that specifies to search for /boot/vmlinuz and not worry about whether /boot is a separate partition. If it is not a separation partition, you must refer to /boot/vmlinuz. If it is a separate partition, you should refer to /vmlinuz, but the symlink allows you to refer to /boot/vmlinuz and it will still work. |
|
Back to top |
|
|
RedSquirrel Guru
Joined: 22 Apr 2008 Posts: 336
|
Posted: Mon Jun 15, 2009 1:03 am Post subject: |
|
|
remix wrote: | and why is it bad if home and boot on / (instead of the mounted partitions) have them?
the /home and /boot partition already have them, so when they are mounted, isn't the home and root directories on / not read anymore, i thought it shouldn't matter if it has anything in there. |
You're right. It doesn't matter that much except that they shouldn't be there. It's sort of like having a knife in the section where the spoons go. It just shouldn't be there. (Yes, I'm a little fussy about stuff like this. ) |
|
Back to top |
|
|
iandoug l33t
Joined: 11 Feb 2005 Posts: 849 Location: Cape Town, South Africa
|
Posted: Mon Jul 13, 2009 10:17 pm Post subject: Re: Re-Install help ? |
|
|
remix wrote: |
I'm getting so many errors now that it might make more sense just to reinstall everything.
(errors for one machine being can't compile expat, and i removed it, so when i reboot, i'm pretty sure everything will be broken, and in the other, i can't compile busy-box, can't revdep-rebuild, etc.)
I've been up for the past 12 hours (instead of sleeping) trying to get each little problem (non emerging packages) fixed, I think it would make more sense just to reinstall starting with an entirely fresh updated system.
so here is what i think i have to do. (for each box)
- backup configs, everything in /etc
- backup the world file, so i know what i had installed
- probably want to backup /usr/share/*
- backup /usr/src/linux/.config (although i keep a backup in /boot anyway)
- have some stuff in /opt, but i think it's safe to delete all that and let it merge back in right?
is there anything else that i should backup before formatting the root partition?
- boot up using a livecd
- format root partition
- unpack stage tarball into root
- chroot and continue standard install
|
Um, I've decided to rebuild my old AMD64 box because I'm stuck in some sort of unfixable loop with xorg and ati drivers and can't get them installed ... (forum search function can't seem to find the thread...)
Anyway, So I thought I could just boot from latest minimal CD and re-install without wiping any partitions ... however this turned out to be a bad idea.
The initial untar of the stage 3 file showed many errors .... file is read-only, etc... so those were not overwritten.
So I did it again, telling tar to unlink files that exist before extracting ...
However, when I try to chroot into the new environment, it does not work.
After the chroot /mnt/gentoo /bin/bash command, I get a "$" prompt instead of the "#".
After that, many commands (eg ls) return "illegal instruction".
How do I get around this?
Rebooting to hard drive gives other errors, and the boot stops. It then requires root password (which does not work) or ctrl-D, which just reboots...
Any ideas gratefully received
thanks, Ian _________________ Asus X570-PRO, Ryzen 7 5800X, GeForce GTX 1650, 32 GB RAM | Asus Sabertooth P990, AMD FX-8150, GeForce GTX 560, 16GB Ram |
|
Back to top |
|
|
iandoug l33t
Joined: 11 Feb 2005 Posts: 849 Location: Cape Town, South Africa
|
Posted: Tue Jul 14, 2009 9:02 am Post subject: Re: Re-Install help ? |
|
|
iandoug wrote: |
However, when I try to chroot into the new environment, it does not work.
After the chroot /mnt/gentoo /bin/bash command, I get a "$" prompt instead of the "#".
After that, many commands (eg ls) return "illegal instruction".
How do I get around this?
|
Got around it by backing up important files (to me...) like make.conf, hosts, httpd.conf, vhost.d, then rm assorted system directories like bin / sbin / lib/32/64/ usr ...
Tried again and now things seem to be working okay .... _________________ Asus X570-PRO, Ryzen 7 5800X, GeForce GTX 1650, 32 GB RAM | Asus Sabertooth P990, AMD FX-8150, GeForce GTX 560, 16GB Ram |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|