View previous topic :: View next topic |
Author |
Message |
Deranger Veteran
Joined: 26 Aug 2004 Posts: 1215
|
Posted: Fri Dec 10, 2004 8:18 pm Post subject: |
|
|
I did chrooted install (on another partition), and moved it to my system harddrive...I got similar "cannot open initial console" problem and it was caused by an invalid entry on grub.conf |
|
Back to top |
|
|
seppe Guru
Joined: 01 Sep 2003 Posts: 431 Location: Hove, Antwerp, Belgium
|
Posted: Fri Dec 10, 2004 8:21 pm Post subject: |
|
|
it can't be my grub.conf, because I haven't changed that one for ages.
If anyone can point me to the right direction ... _________________ nitro-sources, because between stable and experimental there exists only speed
Latest release I made: 2.6.13.2-nitro1 |
|
Back to top |
|
|
seppe Guru
Joined: 01 Sep 2003 Posts: 431 Location: Hove, Antwerp, Belgium
|
Posted: Fri Dec 10, 2004 8:28 pm Post subject: |
|
|
Ok, I fixed it ..
see https://forums.gentoo.org/viewtopic.php?p=1718752#1718752 for a solution. Now everyting works without any problems. Thanks again for this great howto, it saved me 2 days of compiling _________________ nitro-sources, because between stable and experimental there exists only speed
Latest release I made: 2.6.13.2-nitro1 |
|
Back to top |
|
|
M@rijn Tux's lil' helper
Joined: 28 Jan 2004 Posts: 145 Location: Zierikzee (The Netherlands)
|
Posted: Fri Dec 10, 2004 10:16 pm Post subject: |
|
|
why excluding so many directory's does he rebuild it at hisself??? _________________ Gentoo is just an Aston Martin, "Power, beauty and soul" |
|
Back to top |
|
|
BlinkEye Veteran
Joined: 21 Oct 2003 Posts: 1046 Location: Gentoo Forums
|
Posted: Sat Dec 11, 2004 9:07 am Post subject: |
|
|
do you mean my exclude directories? no, most of them are dynamically created upon boot time - and some big parts of it (like /var/tmp/portage or /usr/portage are created by portage, might get VERY big and don't need to be backed up because either they are temporary (like /var/tmp/portage or /tmp) or they (/usr/portage get recreated upon an
ok?
[EDIT] to make it clear - except of an "emerge sync" one doesn't need to rebuild anything [/EDIT] _________________ Easily backup up your system? klick
Get rid of SSH Brute Force Attempts / Script Kiddies klick |
|
Back to top |
|
|
M@rijn Tux's lil' helper
Joined: 28 Jan 2004 Posts: 145 Location: Zierikzee (The Netherlands)
|
Posted: Sat Dec 11, 2004 10:44 am Post subject: |
|
|
Maybe an idea, can you make the script so that he automaticly sync your portage? _________________ Gentoo is just an Aston Martin, "Power, beauty and soul" |
|
Back to top |
|
|
BlinkEye Veteran
Joined: 21 Oct 2003 Posts: 1046 Location: Gentoo Forums
|
Posted: Sat Dec 11, 2004 10:56 am Post subject: |
|
|
M@rijn wrote: | Maybe an idea, can you make the script so that he automaticly sync your portage? |
i don't quite understand - would you like to backup your system with portages structure included? if so, there's no problem - remove the --exlude=/usr/portage command. if you d like that after decompressing your stage4.tar.bz2 it would automatically sync portage again - well, i can't do much about that as the command to decompress the archive is just a tar command (tar -xvjpf stage4.tar.bz2). but if you'd like to automate that too simply execute the following:
Code: | tar -xvjpf stage4.tar.bz2 && emerge sync |
_________________ Easily backup up your system? klick
Get rid of SSH Brute Force Attempts / Script Kiddies klick |
|
Back to top |
|
|
M@rijn Tux's lil' helper
Joined: 28 Jan 2004 Posts: 145 Location: Zierikzee (The Netherlands)
|
Posted: Sat Dec 11, 2004 12:01 pm Post subject: |
|
|
ok thnx _________________ Gentoo is just an Aston Martin, "Power, beauty and soul" |
|
Back to top |
|
|
Greven Tux's lil' helper
Joined: 28 Jul 2002 Posts: 138
|
Posted: Mon Jan 03, 2005 6:23 pm Post subject: |
|
|
I made a few changes to you script Blinkeye
Code: |
#!/bin/bash
# Backup script for Gentoo Linux
# This program is distributed under the terms of GPL version 2.
# Author: BlinkEye
# Date: 03.12.2004
# Comments/Remarks mailto "blinkeye dot gmx dot ch"
# check if /home/* will be backed up too
/bin/echo -n "Do you want to backup /home/* ? (y/n) "
read -t 10 home
while [ "$home" != 'y' ] && [ "$home" != 'n' ]; do
/bin/echo "please enter y or n"
read home
done
if [ "$home" == 'n' ]; then
exclude="--exclude=/home/*"
stage4Name=$(hostname)-stage4-minimal-`date +\%d-\%m-\%Y`.tar.bz2
else
stage4Name=$(hostname)-stage4-full-`date +\%d-\%m-\%Y`.tar.bz2
fi
# mount boot
/bin/echo "* mount boot"
/bin/mount /boot >/dev/null 2>&1
# where to put the stage4
stage4Location=/mnt/stage4/
/bin/echo "* Backup stage4 to $stage4Location"
# if necessary create the stage4Location
if [ -d "$stage4Location" ] ; then
/bin/echo "* directory $stage4Location already exists"
else
/bin/echo "* creating directory $stage4Location"
/bin/mkdir -p $stage4Location
fi
# copy the current world file to the stage4 location
/bin/echo "* creating stage4 overview"
/bin/cp /var/lib/portage/world $stage4Location/$(hostname)-stage4-`date +\%d-\%m-\%Y`.txt >/dev/null 2>&1
# options for the archive
tarOptions="--exclude=$stage4Location --exclude=/tmp/* --exclude=/var/tmp/* --exclude=/lost+found/* --exclude=/dev/* --exclude=/proc/* --exclude=/mnt/* --exclude=/sys/* --exclude=/usr/portage/* --exclude=/var/log/* $exclude --create --absolute-names --preserve-permissions --bzip2 --totals --ignore-failed-read --verbose --file"
/bin/echo -e "* creating tar.bz2 archive with the following options:\n"
# create the archive
/bin/echo "tar $tarOptions $stage4Location$stage4Name /"
/bin/echo ""
time /bin/tar $tarOptions $stage4Location$stage4Name /;
/bin/echo -e "\n* stage4 is done"
/bin/echo "* umounting boot"
/bin/umount /boot
|
It's not very big changes.... it just makes direct calles to the program and not alias'. I had a co-work once alias "mkdir" to "cp .." to watch my face. _________________ veritas vos liberabit...
Linux User Number: 346805
Wine-Wiki
AMD 64 3500+ | MSI "K8T NEO2-FIR" | mushkin Dual Channel DDR 400 |
|
Back to top |
|
|
BlinkEye Veteran
Joined: 21 Oct 2003 Posts: 1046 Location: Gentoo Forums
|
Posted: Mon Jan 03, 2005 9:33 pm Post subject: |
|
|
thanks for the input. i changed a few things too and forgot to adjust them here. so, an update has been made. for the moment i won't reflect your changes/suggestion as i think it's more portable this way, but i'll keep it in mind as it's a cleaner way to do things. _________________ Easily backup up your system? klick
Get rid of SSH Brute Force Attempts / Script Kiddies klick |
|
Back to top |
|
|
My_World Guru
Joined: 01 Sep 2003 Posts: 339 Location: Kalahari Desert
|
Posted: Thu Jan 06, 2005 10:46 pm Post subject: |
|
|
Doing the following gives one very disturbing news indeed:
Code: |
tar cjpfv myname.tar.bz2 / --exclude=myname.tar.bz2 --exclude=/proc/* --exclude=/dev/* --exclude=/mnt/*
|
Why I say this? You'll notice the verbose I added and watching the output carefully I get:
Code: |
/mnt/new/home/myworld/.fluxbox/styles/sea/pixmaps/closeufcs.xpm
/mnt/new/home/myworld/.fluxbox/styles/Bawn/
/mnt/new/home/myworld/.fluxbox/styles/Bawn/theme.cfg
/mnt/new/home/myworld/.fluxbox/styles/Bawn/pixmaps/
/mnt/new/home/myworld/.fluxbox/styles/Bawn/pixmaps/selected.xpm
/mnt/new/home/myworld/.fluxbox/styles/Bawn/pixmaps/max.xpm
/mnt/new/home/myworld/.fluxbox/styles/Bawn/pixmaps/icon.xpm
/mnt/new/home/myworld/.fluxbox/styles/Bawn/pixmaps/stuck.xpm
/mnt/new/home/myworld/.fluxbox/styles/Bawn/pixmaps/wtitle.xpm
/mnt/new/home/myworld/.fluxbox/styles/Bawn/pixmaps/stick.xpm
/mnt/new/home/myworld/.fluxbox/styles/Bawn/pixmaps/close.xpm
/mnt/new/home/myworld/.fluxbox/styles/Amok/
|
The directories specified is NOT excluded. What on earth am I missing here?
_________________ "Ubuntu" - an African word meaning "Gentoo is too hard for me". |
|
Back to top |
|
|
BlinkEye Veteran
Joined: 21 Oct 2003 Posts: 1046 Location: Gentoo Forums
|
Posted: Thu Jan 06, 2005 11:33 pm Post subject: |
|
|
because the order of the flags matter. as soon as you use -f (--file) and specify the filename any other options is ignored or considered as a file to archive.
you should use
Code: | tar --exclude=myname.tar.bz2 --exclude=/proc/* --exclude=/dev/* --exclude=/mnt/* -cjpvf myname.tar.bz2 / |
try it, like
Code: | tar --exclude=myname.tar.bz2 --exclude=/proc/* --exclude=/dev/* --exclude=/mnt/* -cjpvf myname.tar.bz2 /mnt/* |
which wouldn't return anything as nothing would be backed up because of your exlude options _________________ Easily backup up your system? klick
Get rid of SSH Brute Force Attempts / Script Kiddies klick |
|
Back to top |
|
|
gungholady Guru
Joined: 19 Oct 2003 Posts: 392
|
Posted: Sat Jan 08, 2005 2:42 am Post subject: |
|
|
Greven,
Your script works great. I tried adding to it to cause it to split the created file into chunks to be burned onto cd's. What I tried adding didn't work.
Here is what I tried using:
#Uncomment if you want to split the tar in cd size chunks
# split the archive to cd size (use: "cat ${archive}.* >> ${archive}" to join the parts)
split --bytes=650000000 ${archive} ${archive}.
echo splitting is done
The only part of it that worked is the echo part. It did not do the split. If someone knows what needs to be changed to work with Graven's script, I would appreciate it. |
|
Back to top |
|
|
BlinkEye Veteran
Joined: 21 Oct 2003 Posts: 1046 Location: Gentoo Forums
|
Posted: Sat Jan 08, 2005 4:32 pm Post subject: |
|
|
[EDIT] misleading information was posted here due to a false article i read and due to not trying it out myself [/EDIT] _________________ Easily backup up your system? klick
Get rid of SSH Brute Force Attempts / Script Kiddies klick
Last edited by BlinkEye on Sun Jan 09, 2005 9:22 am; edited 1 time in total |
|
Back to top |
|
|
gungholady Guru
Joined: 19 Oct 2003 Posts: 392
|
Posted: Sat Jan 08, 2005 5:13 pm Post subject: |
|
|
Yes, you can split bz2 files. I do it all the time. The script I use to backup my home files just finished and they split just fine and they can be put back together and untarred just fine. |
|
Back to top |
|
|
gungholady Guru
Joined: 19 Oct 2003 Posts: 392
|
Posted: Sat Jan 08, 2005 5:38 pm Post subject: |
|
|
Splitting of bz2 files is done in the original mkstage4 script found here:
http://gentoo-wiki.com/HOWTO_Custom_Stage4
I would just like to figure out how to modify the split part of it to work with greven's script. I guess I'll just have to experiment with the difference in his script and the one from gentoo-wiki.com. |
|
Back to top |
|
|
gungholady Guru
Joined: 19 Oct 2003 Posts: 392
|
Posted: Sat Jan 08, 2005 9:43 pm Post subject: |
|
|
When added to the end of greven's script after the line "/bin/echo -e "\n* stage4 is done"", the following will split the file to cd size chunks:
split --bytes=650000000 $stage4Location$stage4Name $stage4Location$stage4Name.
echo splitting is done
The 650000000 can be adjusted according to the size of your cd's. |
|
Back to top |
|
|
BlinkEye Veteran
Joined: 21 Oct 2003 Posts: 1046 Location: Gentoo Forums
|
Posted: Sun Jan 09, 2005 2:22 pm Post subject: |
|
|
i modified my script and changed the split command
Code: | split --suffix-length=1 --bytes=690m $stage4Location$stage4Name $stage4Location"$stage4Name"_ | which results in chunks like
Code: | X40-stage4-minimal-11-12-2004.tar.bz2_a
X40-stage4-minimal-11-12-2004.tar.bz2_b
... |
i made some changes which allow you now to select interactively which folder/files you may want to back up (the modified script is still found here). _________________ Easily backup up your system? klick
Get rid of SSH Brute Force Attempts / Script Kiddies klick |
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Sat Jan 15, 2005 12:53 pm Post subject: |
|
|
I've been on R4 for /home and PORTAGE_TMPDIR for about a year with no crashes lost files or anything.
In the last few days I've been having erratic behaviour. Specifically opera crashing out , once when I closed a window , once when I did empty trash in email client.
Opera may be handling the errors very badly but I am starting to suspect the underlying issue is R4.
I had to fsck.rieser4 to rebuild the superblock , then the fs and only then did I have a stable partition but the lost nodes etc meant that I had lost 3/4 of my mail archive.
Now R4 is supposed to be a fully atomic , journalling fs so how is this even possible and why after perfect functioning since Beta?
At some point in the last 2 weeks I have been using 2.6.10-nitro2 and -nitro4 .
I have just gone back to 2.6.9-nitro1 that I used since it came out around sept2004. Fingers crossed.
How many having issue here are using R4 on 2.6.10 (probably nitro*) ?
I dont beleive R4 has gone flakey after a year without a reason.
Spec check , hands up those on recent nitro.
[EDIT]
Sorry , post went to wrong thread, regard it as [OFF] and heed it if it applies to you. _________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
|
Matteo Azzali Retired Dev
Joined: 23 Sep 2004 Posts: 1133
|
Posted: Thu Jan 27, 2005 9:06 pm Post subject: |
|
|
Well, since I liked this script a LOT, I've modified this to run in my KDE environment without exiting or opening console. (Think to it like a
little frontend-ed version for KDE, (...Kmkstage4 ? )
It has a progress bar but till now I haven't found a way to syncronize it
with tar
Code: |
Sorry, kdialog seems buggy if used as root. no-way.
|
Tested working even if the progress bar stay under the message dialogs,
feel free to modify, expecially if u can sync progress bar with tar .
(Lol, I'm trying ) _________________ Every day a new distro comes to birth. Every day a distro "eats" another.
If you're born distro, no matter what, start to run.
---- http://www.linuxprinting.org/ ---- http://tuxmobil.org/ |
|
Back to top |
|
|
Matteo Azzali Retired Dev
Joined: 23 Sep 2004 Posts: 1133
|
Posted: Sat Jan 29, 2005 12:34 pm Post subject: |
|
|
kmkstage4 final
(make your stage4 under KDE, no need to run in console or as root,
it ask for su with kdesu)
Ok,thanks yaneurabeya for the tip, now it uses xterm and runs fine,
without any problem, neither security neither unstopped process, it
also asks for split the archive. (care, split don't delete the original
big tar)
NOTE: I did not pointed that before cause I thinked it was obvious but....
cause the nature of this script SAFER way to use is to log as root and set:
Code: | chown root:wheel kmkstage4
chmod 751 kmkstage4 (chmod 750 also will do...)
|
Code: |
#!/bin/bash
# Backup script for Gentoo Linux
# Author: BlinkEye
# Date: 09.01.2004
# KDE: Mat
# ask for special folders to be backed up too
list="/home /var/log /usr/portage/distfiles"
kdedial=`locate kdialog | grep bin/kdialog`
kdedialb=`dirname $kdedial`
kdedial=$kdedialb"/kdialog"
kdedc=$kdedialb"/dcop"
kdeforsu=$kdedialb"/kdesu"
#echo "starting kmkstage4 for Kdialog in $kdedial ."
#echo "if its not correct,locate was required"
dcopRef=`$kdedial --progressbar "Configurating" 4`
$kdedc $dcopRef setProgress 1
for folder in $list; do
$kdedial --title "Kmkstage4" --yesno "Do you want to backup $folder?"
answer=$?
if [ $answer = "1" ]; then
exclude="$exclude --exclude=$folder"
elif [ "$folder" != "/usr/portage/distfiles" ]; then
folder=$folder"/*"
for subfolder in $folder; do
$kdedial --title "Kmkstage4" --yesno "Do you want to backup $subfolder?"
answer=$?
if [ $answer = "1" ]; then
exclude="$exclude --exclude=$subfolder"
# stage4 name
stage4Name=$(hostname)-stage4-custom-`date +\%d-\%m-\%Y`.tar.bz2
fi
done
fi
done
if [ "$stage4Name" == "" ]; then
stage4Name=$(hostname)-stage4-minimal-`date +\%d-\%m-\%Y`.tar.bz2
fi
# mount boot
m1="/bin/mount /boot"
# >/dev/null 2>&1 "
m2="echo \"boot mounted\" "
# where to put the stage4
stage4Location=/mnt/stage4/
# if necessary create the stage4Location
if [ -d "$stage4Location" ] ; then
$kdedc $dcopRef setLabel "boot mounted ,Backup stage4 to $stage4Location
directory $stage4Location already exists
creating stage4 overview"
m4="dir $stage4Location"
else
$kdedc $dcopRef setLabel "boot mounted ,Backup stage4 to $stage4Location
creating directory $stage4Location
creating stage4 overview"
m4="mkdir $stage4Location"
fi
$kdedc $dcopRef setProgress 2
# copy the current world file to the stage4 location
m5="cp /var/lib/portage/world $stage4Location/$(hostname)-stage4-`date +\%d-\%m-\%Y`.txt "
#>/dev/null 2>&1 "
# options for the archive
tarOptions="--exclude=$stage4Location --exclude=/tmp/* --exclude=/var/tmp/* --exclude=/lost+found/* --exclude=/dev/* --exclude=/proc/* --exclude=/mnt/* --exclude=/sys/*--exclude=/usr/portage/* --exclude=/usr/share/smssend $exclude --create --absolute-names --preserve-permissions --bzip2 --totals --ignore-failed-read --verbose --file"
$kdedial --title "Kmkstage4" --yesno "creating tar.bz2 archive with the following options: \
\n tar $tarOptions \n $stage4Location$stage4Name \
\n Do you want to continue?"
answer=$?
# create the archive
$kdedc $dcopRef setLabel "last ones"
$kdedc $dcopRef setProgress 3
if [ $answer = "0" ]; then
m6="time tar $tarOptions $stage4Location$stage4Name /"
$kdedial --title "Kmkstage4" --yesno "Do you want to split in CD-size?"
answer=$?
else
$kdedial --title "Kmkstage4" --msgbox "Nothing to do.Stage4 not created"
answer="2"
fi
m7="umount /boot"
#Uncomment the following command
if [ $answer = "0" ]; then
$kdedc $dcopRef setLabel "Configure Splitting and then go"
$kdedc $dcopRef setProgress 4
m8="split --suffix-length=1 --bytes=690m $stage4Location$stage4Name $stage4Location$stage4Name_"
$kdeforsu -dn --nonewdcop -c "xterm -title Kmkstage4Compression -e \" $m1 ; $m4 ; $m5 ; $m6 ; $m7 ; $m8 \""
resultsu=$?
echo "done"
if [ $resultsu = "0" ]; then
$kdedc $dcopRef setLabel "splitting is done,enjoy your stage4"
else
$kdedc $dcopRef setLabel "without root permission no stage4..."
fi
#if you want to split the archive in cd size chunks
elif [ $answer = "1" ]; then
$kdedc $dcopRef setProgress 4
$kdeforsu -dn --nonewdcop -c "xterm -title Kmkstage4Compression -e \" $m1 ; $m4 ; $m5 ; $m6 ; $m7 \""
resultsu=$?
echo "done"
if [ $resultsu = "0" ]; then
$kdedc $dcopRef setLabel "enjoy your stage4"
else
$kdedc $dcopRef setLabel "without root permission no stage4..."
fi
fi
sleep 2
$kdedc $dcopRef close
|
_________________ Every day a new distro comes to birth. Every day a distro "eats" another.
If you're born distro, no matter what, start to run.
---- http://www.linuxprinting.org/ ---- http://tuxmobil.org/ |
|
Back to top |
|
|
schmeggahead Guru
Joined: 25 Feb 2003 Posts: 314 Location: Columbus, Ohio
|
Posted: Tue Feb 08, 2005 12:36 am Post subject: |
|
|
I used this howto to move an existing gentoo installation to raid0 successfully.
Followed the instructions to the letter to create the tarball, omitting directories, etc.
Set up the raid according to the software raid how to:
https://forums.gentoo.org/viewtopic.php?t=68706
to create the raid.
Then used SystemRescueCD to restore according to these instructions.
Pretty cool.
Only a couple of snags:
1. needed to create proc file system:
2. forgot to fix fstab to point to the raid drives.
3. forgot to put grub on the mbr of the raid drives. This was challenging because my motherboard considered an extra IDE controller not on the motherboard to be SCSI. Grub numbered them hd2 and hd3 while kernel numbered the hde and hdg. So raidtab worked fine but grub didn't. I also forgot that to put grub in the mbr, you just specify (hd2) instead of (hd2,0).
All in all pretty smooth. |
|
Back to top |
|
|
BlinkEye Veteran
Joined: 21 Oct 2003 Posts: 1046 Location: Gentoo Forums
|
Posted: Tue Feb 08, 2005 7:26 am Post subject: |
|
|
schmeggahead wrote: | 1. needed to create proc file system:
|
if that's true you didn't use my mkstage4.sh, did you? the exlude option
takes care of that problem _________________ Easily backup up your system? klick
Get rid of SSH Brute Force Attempts / Script Kiddies klick |
|
Back to top |
|
|
schmeggahead Guru
Joined: 25 Feb 2003 Posts: 314 Location: Columbus, Ohio
|
Posted: Wed Feb 09, 2005 12:53 am Post subject: |
|
|
I know what I did wrong in the manual effort:
What a difference a /* makes.
No I didn't use the .sh
I followed the manual steps.
Thanks for the good work. |
|
Back to top |
|
|
JamPS n00b
Joined: 21 Feb 2005 Posts: 1
|
Posted: Mon Feb 21, 2005 4:47 pm Post subject: |
|
|
What I got when I executed BlinkEye's script, my server froze.
Black screen and it dropped all ssh connections... I pressed reset.
I think it had something to do with /dev/pci |
|
Back to top |
|
|
|