LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-07-2008, 07:12 AM   #1
Alan Kearin
LQ Newbie
 
Registered: May 2008
Posts: 8

Rep: Reputation: 0
G4L - restoring from DVD


Hi all,

Im trying to image one laptop to the rest of my wireless laptop lab, so figured I could use G4L to do this. I didn't know how to set the G4L boot disk up to recognise my wireless card so I needed to backup/restore to DVD. I managed to write my image file and burn it to a DVD, but when I boot up into G4L I cant choose the DVD drive as a local restore point option.

Did some research and found that I am supposed to mount the drive, but when I run cat /etc/fstab I cant see anything that looks like a DVD drive to mount. - here is the output


/dev/ram0 / ext2 rw 0 0
proc /proc proc rw 0 0




When I run the same command on my working OpenSUSE 10.3 laptop I still don't see anything that looks like a DVD drive - here is the output


/dev/disk/by-id/scsi-SATA_WDC_WD800BEVS-2_WD-WXEX07328344-part5 / ext3 acl,user_xattr 1 1
/dev/disk/by-id/scsi-SATA_WDC_WD800BEVS-2_WD-WXEX07328344-part6 /home ext3 acl,user_xattr 1 2
/dev/disk/by-id/scsi-SATA_WDC_WD800BEVS-2_WD-WXEX07328344-part2 swap swap
defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0


where is my DVD drive? Its working fine, but isnt it supposed to show up here?

Can anyone tell me how I can image over a wireless network or else restore from DVD??

Much thanks from an obviously confused linux newbie.
 
Old 05-07-2008, 07:18 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
Determine what the device is and manually mount the dvd disc. You might want to create a /mnt/dvd directory to mount it on.

Use the "iso9660" filesystem.

example:
sudo mount -t iso9660 /dev/sr0 /mnt/dvd -o ro,unhide
 
Old 05-07-2008, 07:29 AM   #3
Alan Kearin
LQ Newbie
 
Registered: May 2008
Posts: 8

Original Poster
Rep: Reputation: 0
thx for the quick reponse, but I am still confused. You say to determine what the device is, but this is what I seem to be having trouble doing. there doesn't seem to be a device listed when I run the cat /etc/fstab

How else do I determine what the device is?

Im sure its something simple but I just cant find how to do it...

thx
 
Old 05-07-2008, 08:52 AM   #4
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
Try this
Code:
dmseg |more
 
Old 05-08-2008, 01:10 PM   #5
Alan Kearin
LQ Newbie
 
Registered: May 2008
Posts: 8

Original Poster
Rep: Reputation: 0
Thumbs down

not sure what dmseg is supposed to do, I couldnt find much info on the web, anyway, when I tried it I just got command not found is there a package I need to install for this?
 
Old 05-08-2008, 01:57 PM   #6
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
Ok,try with df command.Btw,what distro are you using?
 
Old 05-08-2008, 01:58 PM   #7
seraphim172
Member
 
Registered: May 2008
Posts: 101

Rep: Reputation: 15
df

/etc/fstab holds information mostly about devices that are constantly available, like internal hard drives. A DVD is a typical removable data storage unit, so you won't have it in /etc/fstab.

You wrote that the device is working fine, so you should see the device mount point when running 'df' on the command-line. Then again, you don't need to mount it again if it is auto-mounted already.

Linux Archive

Last edited by seraphim172; 06-05-2008 at 11:45 AM.
 
Old 05-09-2008, 07:36 AM   #8
Alan Kearin
LQ Newbie
 
Registered: May 2008
Posts: 8

Original Poster
Rep: Reputation: 0
Unhappy

Using OpenSUSE 10.3

df does not come up with anything interesting under the G4L bootdisk - just rootfs and /dev/root



so I tried df on my working laptop in OpenSUSE 10.3 and again nothing - unless I have a DVD in the drive - so I guess it mounts and unmounts the drive automatically? so, I found the device name on the working laptop - /dev/sr0 - cool. maybe it is the same on both laptops?

so I have tried to mount that same device name on the laptop I am trying to image, it says special device /dev/sr0 does not exist.

Next I tried booting up the working laptop with G4L and tried mounting /dev/sr0 on that laptop I get exactly the same results. - does not exist

It seems something is actually missing from the G4L bootdisk - none of the hard drive partititons appear when running cat /etc/fstab, but when I enter G4L it shows all of them as sda sda1 sda2 etc (no DVD drive though)

Can anyone explain to me (or point me in the direction of a resource which will explain) exactly how and when the devices are recognised on bootup? tried to research it but cant find the info.

I know that restoring an image from a dvd can't be that difficult - there must be something fairly basic I am missing.

cheers for any help...
 
Old 05-09-2008, 08:22 AM   #9
Alan Kearin
LQ Newbie
 
Registered: May 2008
Posts: 8

Original Poster
Rep: Reputation: 0
ok - scrap that - Ive found out the device name using this code

cat /proc/sys/dev/cdrom/info

so my dvd drive is hda

so now I can mount this drive using

mount -t iso9660 /dev/hda /media/cdrom

all cool. can browse to the directory and look at the files. brilliant.

but when I go back into G4L I still cant see how to restore from this. when I go to the options of local drive to choose from it just has sda, sda1, sda2, sda3 etc.
 
Old 05-12-2008, 05:10 AM   #10
Alan Kearin
LQ Newbie
 
Registered: May 2008
Posts: 8

Original Poster
Rep: Reputation: 0
So I boot up with G4L which means I am running on a Ramdisk yes?

So if I mount my DVD it is mounted in the Ramdisk, how do I mount it onto one of the harddrive partitions? (which I guess I need to do as only the harddrive partitions are appearing in G4L)

Do I have to mount the partition to the ramdisk and then mount the DVD to that?

Or does anyone know an alternative to what I am trying to do? starting to think that G4L is not the tool I need...
 
Old 05-12-2008, 09:49 PM   #11
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
If you are running from a Live distro, the root directory (/) is in ram. You can mount the dvd on one directory and the target drive on another (assuming g4l doesn't restore to the partition device). The g4l program may restore to the partition itself as in to /dev/sda2. Generally, I would use a file based backup instead of a imaging program, unless this was for a fresh installation.

If it were a fresh installation, I would A) create a file of zeroes filling up the partition to zero out unused space on a reused partition. B) delete this file C) use the dd command to create the image D) pipe the output through either gzip or bzip2 to compress the image E) if the image were >4.7GB, pipe the output through the split program if I wanted to save smaller slices on DVDs. Saving to a network share or an external drive would work out better. If there is a 2GB limit on file sizes then split may still be necessary.

As a demo, here I will create a compressed image of my /boot partition:
Code:
> mount | grep /boot
/dev/sda1 on /boot type ext3 (rw,acl,user_xattr)
> df /boot
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1               155543     24602    122911  17% /boot
> sudo dd if=/dev/zero bs=1024 count=122910 of=/boot/zerofile
root's password:
122910+0 records in
122910+0 records out
125859840 bytes (126 MB) copied, 2.05592 s, 61.2 MB/s
> df /boot
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1               155543    147996         0 100% /boot
> sudo rm /boot/zerofile
> sudo dd if=/dev/sda1 bs=1024 | gzip - >backup/sda1.img.5-10-08.gz
160618+1 records in
160618+1 records out
164473344 bytes (164 MB) copied, 8.6136 s, 19.1 MB/s
> ls -lh backup/sda1.img.5-10-08.gz
-rw-r----- 1 jschiwal jschiwal 19M 2008-05-12 20:47 backup/sda1.img.5-10-08.gz
The first dd command was used to create the "zerofile" consisting of just zeros and filling up the free space. The second dd command was used to create the image file which was compressed using gzip before saving it.

To restore, the reverse is used:
Code:
sudo zcat backup/sda1.img.5-10-08.gz | dd bs=1024 of=/dev/sda1
Except that I would probably be running from a boot disk or live distro, so the path to the sda1.img.5-10-08.gz file would be different. Running under a boot disk, I would be the root user as well so "sudo" wouldn't be necessary. You would need to partition the disk drive first, unless you have identical drives and copy the MBR as well.

PS. On SuSE 10.3 for some reason, kdar isn't available. I had used it with SuSE 10.2. I installed the old version after extracting libdar-3.0.so from a SuSE 10.2 package. This allowed the SuSE 10.2's kdar package to be installed.
dar stands for disc archive. It is like tar but creates slices that you can burn to a CD or DVD disc. Kdar is a kde front end allowing you to use dar in the gui. It works a lot like backup exec in windows. You can even export a bash script that uses the dar command to restore the backup from the console rather than using kdar. A backup job can also be setup and exported as a script. This would allow you to use this script in a cron job to perform routine incremental backups automatically.

PPS.
It has been a while since the first post, and I forgot when responding that you were duplicating an installation instead of a general backup.

One last thing, in your first post, you mentioned a local restore point. That sounds more like the device to restore to rather than the source of the image.

Simply duplicating an image to another computer will mostly work if the destination hardware is the same. You will need to change some things such as any unique static network settings such as the IP address, and the hostname. If the target machine has different hardware, you may need different kernel modules in the initrd file to enable it to boot. A different machine using a different wireless card will need different firmware for the wireless to work.

Last edited by jschiwal; 05-12-2008 at 10:20 PM.
 
Old 05-13-2008, 07:30 AM   #12
Alan Kearin
LQ Newbie
 
Registered: May 2008
Posts: 8

Original Poster
Rep: Reputation: 0
thx for that info - just in reply, yes, I want to reproduce an installation on identical laptops, mainly because it was a headache to get the wireless working and thought it would be easier just to image the successful installation across. Well, no, but at least Im learning a lot more!!!

The restore point was just my language which could have been misleading - it is definitely the image source I couldnt locate on DVD.

I have to say that as someone who has imaged hundreds of windows PC's in the past that I am quite surprised there isnt an easier way to do this. Well, I guess G4L is simple enough IF you have a network available to backup/restore from, but surprising that this seems assumed in the programming - 50% of the time I have done imaging in the past it has been locally.

Yes, it seems G4L does restore directly to the partition itself, the problem is I can mount the DVD but it is mounted through the ramdisk and I cant select the path to it through G4L (because it ONLY has the partitions as possible selections to restore from/to) If that makes sense.

anyway, I will attempt your command-line suggestion and see how I go.

cheers
 
Old 05-15-2008, 01:01 AM   #13
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
I can't imagine that you can't select an image file produced by g4l itself and use that to restore a partition. The devices listed (sda1, sda2, etc) sound like the target rather than the source.
 
Old 06-07-2008, 09:10 AM   #14
Alan Kearin
LQ Newbie
 
Registered: May 2008
Posts: 8

Original Poster
Rep: Reputation: 0
OK, I managed to get this sorted with some help from the guy in charge of G4L - he can be found here : http://freshmeat.net/projects/g4l/

it wasnt hard to do once he worked out what the problem was - search for the thread "g4l over wireless?" If anyone need to work out the solution...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
G4L via FTP Guignol Linux - Server 4 10-21-2011 11:09 AM
PXE boot and g4l paul_mat Linux - Networking 0 04-03-2006 10:57 PM
g4l (Ghost4Linux) Problems Arkiados Linux - Software 1 03-31-2005 02:25 PM
G4l imaging and cloning tool cccc Linux - Software 0 01-30-2005 05:38 PM
howto mount image from g4l ? pewi Linux - General 0 11-25-2004 04:46 AM


All times are GMT -5. The time now is 07:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration