Thanks for the response. I'll give it a try tonite. On Tuesday 14 March 2006 17:18, Greg Freemyer wrote:
Answers interspersed, but as a general rule I like to do a "fdisk -l" on a machine to get a feel for what block/disk devices are attached.
It accesses the drives in a readonly manner and lets you see a list of what drives the OS sees.
On 3/14/06, kevin.kempter@dataintellect.com
wrote: Hi all;
I recently installed SUSE 10 (the paid version) on a new IBM Z series (Z60m) Thinkpad. The Thinkpad has an "ultra-bay" which is nothing more than a drive bay where the cd/dvd drive is so I can remove the cd/dvd burner and insert other devices. I have a hard drive adaptor bay that goes into this ultra-bay drive.
Here's what I plan to do: - remove the cd/dvd drive and insert the hard drive adaptor with an identical drive as what is installed internally (SATA 100G drive)
- boot into single user mode (i.e. boot up and as root run 'init 1')
Should work, but there is a small chance your bios will try to boot from the drive in the ultra-bay. If so, tinker with you bios.
- use dd to make a backup of the entire internal drive onto the drive in the ultra-bay
Here's my questions/concerns:
1) by pulling out the cd/dvd device and later re-inserting it do I risk any issues due to fstab, hot swap/udev, etc?
Sounds like you are going to do all the swapping while the laptop is powered off.
In that case I don't think so. I do stuff like this all the time, but I have not worked with your specific brand of laptop.
2) I assume the command I need to run is 'dd if=/dev/SRC of=/dev/TARGET' but I'm not sure what device my internal drive is. I assume the SRC is /dev/dsda based on what I see from a df -h and an fdisk command. How do I a) ensure the SRC is correct and b) figure out what the TARGET should be (see the df -h and fdisk output below)
I would use "fdisk -l" with no other args to verify my drive setup. If you want to look even deeper look in /sys/block. All of your disks should have a directory there. Inside the directory will be files that describe the individual drives.
Be sure to do this after connecting up the extra SATA drive. SATA is not like IDE. Drive letters can/will change as you connect up more drives.
For the dd I would use:
dd if=/dev/SRC of=/dev/TARGET conv=noerror,sync bs=4k
noerror says not to abort the dd if you encounter a read error. sync says to null fill any sectors that experience read errors. 4k is the block size. Not always critical, but I have seen it drastically improve speed.
3) is this the best way to accomplish a true image of my drive?
Yes, assuming the drives are the same size. If you need to resize partition then I think there are tools to use.
Below is my 'df -h' output and the results of a print from an 'fdisk /dev/sda'. Thanks in advance for your help. (btw SUSE Rocks!)
kkempter@Issac $ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda2 1.1G 351M 678M 35% / tmpfs 1014M 12K 1014M 1% /dev/shm /dev/sda3 788M 20M 729M 3% /boot /dev/sda12 15G 5.5G 8.6G 39% /data /dev/sda10 18G 1.1G 16G 7% /download /dev/sda9 22G 13G 8.7G 59% /home /dev/sda8 7.1G 2.7G 4.4G 38% /opt /dev/sda11 9.1G 4.5G 4.6G 50% /stage /dev/sda5 2.3G 1.5G 813M 65% /tmp /dev/sda6 15G 6.8G 7.3G 49% /usr /dev/sda7 5.1G 807M 4.3G 16% /var
root@Issac # fdisk /dev/sda The number of cylinders for this disk is set to 12161. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/sda: 100.0 GB, 100030242816 bytes 255 heads, 63 sectors/track, 12161 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System /dev/sda1 1 275 2208906 82 Linux swap / Solaris /dev/sda2 276 406 1052257+ 83 Linux /dev/sda3 * 407 508 819315 83 Linux /dev/sda4 509 12161 93602722+ f W95 Ext'd (LBA) /dev/sda5 509 796 2313328+ 83 Linux /dev/sda6 797 2624 14683378+ 83 Linux /dev/sda7 2625 3277 5245191 83 Linux /dev/sda8 3278 4191 7341673+ 83 Linux /dev/sda9 4192 6933 22025083+ 83 Linux /dev/sda10 6934 9153 17832118+ 83 Linux /dev/sda11 9154 10328 9438156 83 Linux /dev/sda12 10329 12161 14723541 83 Linux
Command (m for help): q
=============================================== Your mouse has moved Windows must restart to affect the change(s) Press any key to reboot. ===============================================
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
HTH Greg -- Greg Freemyer The Norcross Group Forensics for the 21st Century