Author Topic: Backup question FIXED - not exactly solved  (Read 1501 times)

Offline old_guy

  • Hero Member
  • *****
  • Posts: 706
Backup question FIXED - not exactly solved
« on: May 04, 2010, 11:40:49 AM »
I installed 2010 KDE to an ext3 partition and have played around with it and made some modifications. I wanted to make a backup of it like I have done in the past with rsync. I had no problem going to another ext3 partition and with the changes to fstab and menu.lst, I could boot into it OK. I then thought why not back it up to an ext4 partition. After several failures I thought I found my problem in the fstab file. I had changed /dev/sda9 to /dev/sdb6 but forgot about changing ext3 to ext4. It still fails with a kernel panic. Using lsmod I see that it does not have ext4 loading and maybe other problems.
After my little disertation - my question is - is there an easy way to backup going from ext3 to ext4 or should I just do a new install to ext4 and start trying to duplicate what I have on the ext3 install over to the new one???

Earl
« Last Edit: May 07, 2010, 06:07:38 AM by old_guy »
Never too old to learn.

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11597
  • ----IOFLU----
Re: Backup question
« Reply #1 on: May 04, 2010, 11:47:41 AM »
I installed 2010 KDE to an ext3 partition and have played around with it and made some modifications. I wanted to make a backup of it like I have done in the past with rsync. I had no problem going to another ext3 partition and with the changes to fstab and menu.lst, I could boot into it OK. I then thought why not back it up to an ext4 partition. After several failures I thought I found my problem in the fstab file. I had changed /dev/sda9 to /dev/sdb6 but forgot about changing ext3 to ext4. It still fails with a kernel panic. Using lsmod I see that it does not have ext4 loading and maybe other problems.
After my little disertation - my question is - is there an easy way to backup going from ext3 to ext4 or should I just do a new install to ext4 and start trying to duplicate what I have on the ext3 install over to the new one???

Earl

Have you tried editing fstab again, to change the ext3 to ext4, then add ext4 to /etc/modprobe.preload?
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline old_guy

  • Hero Member
  • *****
  • Posts: 706
Re: Backup question
« Reply #2 on: May 04, 2010, 03:44:51 PM »
old-polack
I haven't tried yet, because a fresh install to an ext4 partition doesn't show it in /etc/modprobe.preload. A lsmod shows these:

ext4                  264427  1
jbd2                   63431  1 ext4
crc16                   1303  1 ext4

Which are not in the ext3 install, so I was thinking that there might be more to it. Just thought there might be a simple answer - like more/different options to rsync. I've done about 20 different installs/reinstalls in the last two weeks, just playing around. Have to work up my curiosity some to see how far to go with this.

Earl
Never too old to learn.

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11597
  • ----IOFLU----
Re: Backup question
« Reply #3 on: May 04, 2010, 03:54:26 PM »
old-polack
I haven't tried yet, because a fresh install to an ext4 partition doesn't show it in /etc/modprobe.preload. A lsmod shows these:

ext4                  264427  1
jbd2                   63431  1 ext4
crc16                   1303  1 ext4

Which are not in the ext3 install, so I was thinking that there might be more to it. Just thought there might be a simple answer - like more/different options to rsync. I've done about 20 different installs/reinstalls in the last two weeks, just playing around. Have to work up my curiosity some to see how far to go with this.

Earl

In the fresh install to ext4 the initrd image has the ext4 module loaded, it picks that up from the fstab. In an install to an ext3 partition, the ext3 module is in the initrd image. When moved to an ext4 partition, the ext4 module needs to be loaded from somewhere in order to boot to the new ext4 partition, so modprobe.preload gets it there the quickest.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline old_guy

  • Hero Member
  • *****
  • Posts: 706
Re: Backup question
« Reply #4 on: May 04, 2010, 04:35:56 PM »
Added ext4 to /etc/modprobe.preload -NG
Then also added jbd2 & crc16 - still NG
Still get kernel panic
Never too old to learn.

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11597
  • ----IOFLU----
Re: Backup question
« Reply #5 on: May 04, 2010, 04:47:45 PM »
Added ext4 to /etc/modprobe.preload -NG
Then also added jbd2 & crc16 - still NG
Still get kernel panic


Ever made an initrd image before?  ;D

That's a possibility, but to be quicker, as you have a fresh install to an ext4 partition, you could cheat and just copy that initrd image to the copied installation. (I've been known to cheat and do that before)  ;D
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline old_guy

  • Hero Member
  • *****
  • Posts: 706
Re: Backup question
« Reply #6 on: May 04, 2010, 05:21:08 PM »
Did
Done
Good
I haven't made an initrd image before - so the copy worked.Writing from sdb7 (the ext4 backup) now. Then there is not an easy rsync or other to backup from ext3 to ext4???
Thanks for the help - it has been interesting. I usually find some little problem and have a hard time just leaving it alone. Now I guess I have to read some more about initrd and other fun boot processes.
Until next time ...
Earl
Never too old to learn.

Offline old_guy

  • Hero Member
  • *****
  • Posts: 706
Re: Backup question
« Reply #7 on: May 04, 2010, 06:20:10 PM »
Just a followup:

View copied initrd initrd-2.6.33.2-pclos1.pae.img

initrd.img is in gzip format.  So move initrd.img to initrd.gz
cp initrd-2.6.33.2-pclos1.pae.img initrd-2.6.33.2-pclos1.pae.gz

Unzip the initrd.gz file
gunzip initrd-2.6.33.2-pclos1.pae.gz

After unziping the initrd.gz file, the initrd is further in cpio ‘newc’ format. So extract the files from initrd using cpio ‘newc’ format
mkdir tmp2
cd tmp2
cpio -id < ../initrd-2.6.33.2-pclos1.pae

Then look at init
cat init | grep ext4
echo "Loading ext4 module"
modprobe -q ext4
mkrootdev -t ext4 -o defaults,ro UUID=cf46873d-ea05-4c29-9798-7dd0583d9b0a

I guess I found how it loads ext4

Thanks again
old-polack

PS
I might learn a little of this stuff yet
but
still no straight copy from ext3 to ext4

« Last Edit: May 04, 2010, 06:21:53 PM by old_guy »
Never too old to learn.

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11597
  • ----IOFLU----
Re: Backup question
« Reply #8 on: May 04, 2010, 07:03:10 PM »
Just a followup:

View copied initrd initrd-2.6.33.2-pclos1.pae.img

initrd.img is in gzip format.  So move initrd.img to initrd.gz
cp initrd-2.6.33.2-pclos1.pae.img initrd-2.6.33.2-pclos1.pae.gz

Unzip the initrd.gz file
gunzip initrd-2.6.33.2-pclos1.pae.gz

After unziping the initrd.gz file, the initrd is further in cpio ‘newc’ format. So extract the files from initrd using cpio ‘newc’ format
mkdir tmp2
cd tmp2
cpio -id < ../initrd-2.6.33.2-pclos1.pae

Then look at init
cat init | grep ext4
echo "Loading ext4 module"
modprobe -q ext4
mkrootdev -t ext4 -o defaults,ro UUID=cf46873d-ea05-4c29-9798-7dd0583d9b0a

I guess I found how it loads ext4

Thanks again
old-polack

PS
I might learn a little of this stuff yet
but
still no straight copy from ext3 to ext4



Funny you should mention. Look familiar?  ;D

Code: [Select]
#!/bin/nash

mount -t proc /proc /proc
setquiet
echo Mounting proc filesystem
echo Mounting sysfs filesystem
mount -t sysfs /sys /sys
echo Creating /dev
echo Trying to use devtmpfs (ignore errors)
mount -o mode=0755 -t devtmpfs /dev /dev
cond -ne 0 /bin/init_devs
/bin/ln -s ram1 /dev/ram
mkdir /dev/pts
mount -t devpts -o gid=5,mode=620 /dev/pts /dev/pts
mkdir /dev/shm
mkdir /dev/mapper
/bin/ln -s fb0 /dev/fb
/bin/plymouthd --attach-to-session
echo Setting up hotplug.
hotplug
/lib/udev/console_init tty0
plymouth --show-splash
echo Creating block device nodes.
mkblkdevs
echo Creating character device nodes.
mkchardevs
echo "Loading usbhid module"
modprobe -q usbhid
echo "Loading ehci-hcd module"
modprobe -q ehci-hcd
echo "Loading ohci-hcd module"
modprobe -q ohci-hcd
echo "Loading uhci-hcd module"
modprobe -q uhci-hcd
mount -t usbfs /proc/bus/usb /proc/bus/usb
echo "Loading ext4 module"
modprobe -q ext4
echo "Loading crc-t10dif module"
modprobe -q crc-t10dif
echo "Loading scsi_mod module"
modprobe -q scsi_mod
echo "Loading sd_mod module"
modprobe -q sd_mod
echo "Loading usbcore module"
modprobe -q usbcore
echo "Loading usb-storage module"
modprobe -q usb-storage
echo "Loading pci_hotplug module"
modprobe -q pci_hotplug
echo "Loading shpchp module"
modprobe -q shpchp
echo "Loading libata module"
modprobe -q libata
echo "Loading pata_amd module"
modprobe -q pata_amd
echo "Loading ide-core module"
modprobe -q ide-core
echo "Loading ide-disk module"
modprobe -q ide-disk
echo "Loading amd74xx module"
modprobe -q amd74xx
echo "Loading pata_acpi module"
modprobe -q pata_acpi
echo "Loading ide-pci-generic module"
modprobe -q ide-pci-generic
echo "Loading ata_generic module"
modprobe -q ata_generic
echo "Loading ide_generic module"
modprobe -q ide_generic
echo waiting for device sdc14 to appear (timeout 1min)
waitdev --timeout=60000000 UUID=ab32e99a-5bb8-4360-b75d-e13df5412608
echo waiting for device sda2 to appear (timeout 1min)
waitdev --timeout=60000000 UUID=438b91c3-6812-40b2-a267-d177415042c5
mkblkdevs
nash-resume
echo Creating root device.
mkrootdev -t ext4 -o defaults,ro LABEL=minime2010
echo Mounting root filesystem.
mount /sysroot
cond -ne 0 plymouth --hide-splash
echo Setting up other filesystems.
setuproot
loadpolicy
plymouth --newroot=/sysroot
echo Switching to new root and running init.
switchroot
echo Booting has failed.
sleep -1
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline old_guy

  • Hero Member
  • *****
  • Posts: 706
Re: Backup question
« Reply #9 on: May 06, 2010, 09:56:49 AM »
old-polack
After playing around in the ext4 bkup, several different things pop up an error:

Cannot find a boot loader installed

Any ideas???

Earl
Never too old to learn.

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11597
  • ----IOFLU----
Re: Backup question
« Reply #10 on: May 06, 2010, 05:01:04 PM »
old-polack
After playing around in the ext4 bkup, several different things pop up an error:

Cannot find a boot loader installed

Any ideas???

Earl


No /boot/grub directory?
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline old_guy

  • Hero Member
  • *****
  • Posts: 706
Re: Backup question
« Reply #11 on: May 06, 2010, 07:12:18 PM »
Yes I have a /boot/grub directory. It does load up.

grub>
      find /boot/grub/stage2
 (hd0,0)   < 2007
 (hd0,5)   < 2009
 (hd0,6)   < Mini
 (hd0,7)   < Gnome
 (hd0,8)   < 2010 ext3
 (hd0,9)   < Zen
 (hd1,0)   < 2010 test
 (hd1,5)   < 2010 bkup ext3
 (hd1,6)   < 2010 bkup ext4 - tbl ******   
 (hd1,7)   < 2010 new install ext4

hd1,6 - sdb7 is the one I have been talking about (copied initrd to get working).

On sda1 menu.lst
this fails:

title bkup
root (hd1,6)
chainloader +1

but this works:

title 2010 BKUP ext4
kernel (hd1,6)/boot/vmlinuz BOOT_IMAGE=linux root=/dev/sdb7 splash=silent vga=788
initrd (hd1,6)/boot/initrd.img


I also modified "doby" /usr/share/plymouth/motif.png (to give him a red eye), but need to run as root "switch-themes PCLinuxOS" which also gives me the "Cannot find a boot loader installed" error.

I renamed the grub folder and copied in the one from my new ext4 install - that opens up another can of worms. If this is as strange to you as it is to me, I'll close this up with the warning to all - don't try to backup your ext3 install to an ext4 partition!!!

Earl
« Last Edit: May 06, 2010, 07:16:09 PM by old_guy »
Never too old to learn.

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11597
  • ----IOFLU----
Re: Backup question
« Reply #12 on: May 06, 2010, 07:35:15 PM »
Yes I have a /boot/grub directory. It does load up.

grub>
      find /boot/grub/stage2
 (hd0,0)   < 2007
 (hd0,5)   < 2009
 (hd0,6)   < Mini
 (hd0,7)   < Gnome
 (hd0,8)   < 2010 ext3
 (hd0,9)   < Zen
 (hd1,0)   < 2010 test
 (hd1,5)   < 2010 bkup ext3
 (hd1,6)   < 2010 bkup ext4 - tbl ******   
 (hd1,7)   < 2010 new install ext4

hd1,6 - sdb7 is the one I have been talking about (copied initrd to get working).

On sda1 menu.lst
this fails:

title bkup
root (hd1,6)
chainloader +1

but this works:

title 2010 BKUP ext4
kernel (hd1,6)/boot/vmlinuz BOOT_IMAGE=linux root=/dev/sdb7 splash=silent vga=788
initrd (hd1,6)/boot/initrd.img


I also modified "doby" /usr/share/plymouth/motif.png (to give him a red eye), but need to run as root "switch-themes PCLinuxOS" which also gives me the "Cannot find a boot loader installed" error.

I renamed the grub folder and copied in the one from my new ext4 install - that opens up another can of worms. If this is as strange to you as it is to me, I'll close this up with the warning to all - don't try to backup your ext3 install to an ext4 partition!!!

Earl


For the chainloader stanza to work, you need to install grub to that partition's boot sector, not change the grub directory. The one that was there was just fine. Delete the one you last copied, and rename the original. Then run;

[root@localhost ~]# grub

from the grub prompt;

grub> root (hd1,6)

grub> setup (hd1,6)

When grub is done with the installation;

grub> quit

Reboot and try the chainloader option again. If the information you supplied is correct, it should give a second boot menu, and when the top option is selected, it should boot normally.

Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline old_guy

  • Hero Member
  • *****
  • Posts: 706
Re: Backup question
« Reply #13 on: May 06, 2010, 08:53:38 PM »
Thought I had done that, but reran "root", "setup" for:
(hd0,0)
 (hd0,5)
 (hd0,6)
 (hd0,7)
 (hd0,8)
 (hd0,9)
 (hd1,0)
 (hd1,5)
 (hd1,6)
 (hd1,7)
and the chainloader is working, but still get:
[root@new earl]# switch-themes PCLinuxOS
Cannot find a boot loader installed

oh well...

Never too old to learn.

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11597
  • ----IOFLU----
Re: Backup question
« Reply #14 on: May 06, 2010, 09:14:40 PM »
Thought I had done that, but reran "root", "setup" for:
(hd0,0)
 (hd0,5)
 (hd0,6)
 (hd0,7)
 (hd0,8)
 (hd0,9)
 (hd1,0)
 (hd1,5)
 (hd1,6)
 (hd1,7)
and the chainloader is working, but still get:
[root@new earl]# switch-themes PCLinuxOS
Cannot find a boot loader installed

oh well...



I'm not sure what process you used before, to change the theme, but could you retry the whole process again, now that the chainloader is working, to see if something in that makes a difference?
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...