LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-14-2008, 11:49 PM   #1
ogoy
LQ Newbie
 
Registered: Mar 2007
Posts: 7

Rep: Reputation: 0
Making cloned disk bootable


Hi, I recently cloned a hard disk (using dd) and mounted it on my host server. This is what it looks like:

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 18662 149902483+ 83 Linux
/dev/sda2 18663 19457 6385837+ 5 Extended
/dev/sda5 18663 19457 6385806 82 Linux swap / Solaris

Disk /dev/sdb: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 9726 78124063+ 83 Linux

The device it is running on is /dev/sdb1, this is the cloned disk I want to make bootable, I'm planning to make it the primary hard disk and use the other hard disk as a slave instead.

Thanks for looking!
 
Old 05-15-2008, 12:00 AM   #2
ogoy
LQ Newbie
 
Registered: Mar 2007
Posts: 7

Original Poster
Rep: Reputation: 0
Oh, this information might help, the disk is a direct clone of a working environment I wish to duplicate (It is a full disk image from the root down). It will serve as a remote running online backup of the original. I use LILO and here is the config:

boot=/dev/hda
map=/boot/map
install=/boot/boot.b
timeout=50
prompt
default=linux
image=/boot/vmlinuz-2.4.21-esoft.10
label=linux
read-only
root=/dev/hda7
initrd=/boot/initrd-2.4.21-esoft.10.img
append="panic=1"
image=/boot/vmlinuz-2.4.21-esoft.4
label=backup
read-only
root=/dev/hda7
initrd=/boot/initrd-2.4.21-esoft.4.img
 
Old 05-16-2008, 03:31 PM   #3
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Slackware/Knoppix
Posts: 1,761
Blog Entries: 14

Rep: Reputation: 267Reputation: 267Reputation: 267
Hi, I hope I can help.

Clarify something for me: You have 3 disks /dev/sda, /dev/sdb and /dev/hda? Or is /dev/sda the same as /dev/hda because you changed over to libata? /dev/sdb is a clone of /dev/sda using dd but is 1/2 the size? ...

Making a lot of assumptions, if both disks are still installed, I'd say, do something like this:
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
timeout=50
prompt
default=linux
image=/boot/vmlinuz-2.4.21-esoft.10
label=linux
read-only
root=/dev/sdb1
initrd=/boot/initrd-2.4.21-esoft.10.img
with the MBR on /dev/hda booting the root partition on sdb. If you're going to switch the master and slave so that disk "b" is now "a", and the new disk is an exact clone, there should be no problem after you make the switch, without changing LILO or anything.
 
Old 05-18-2008, 07:55 PM   #4
ogoy
LQ Newbie
 
Registered: Mar 2007
Posts: 7

Original Poster
Rep: Reputation: 0
hi! i switched device priorities and set the clone as the first device:

Disk /dev/sda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 9726 78124063+ 83 Linux

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 18662 149902483+ 83 Linux
/dev/sdb2 18663 19457 6385837+ 5 Extended
/dev/sdb5 18663 19457 6385806 82 Linux swap / Solaris

I have 2 hard disks, the clone being sda and the other disk sdb. Notice /dev/sda1 is not bootable, I've been trying for days to make that disk boot, to no avail

How would you approach this problem? I created a bootable usb pen drive using DSL (damn small linux) and wish to use that as a rescue disk if necessary. I've been googling for a howto on DSL as a rescue disk but come up with nothing, also the boot options dont give me anything about rescuing a disk. ugh!
 
Old 05-19-2008, 12:07 PM   #5
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Slackware/Knoppix
Posts: 1,761
Blog Entries: 14

Rep: Reputation: 267Reputation: 267Reputation: 267
Can't help you with the pen drive rescue disk and DSL.
I presume your system currently boots off of /dev/sdb1.
If your system doesn't boot anymore, I'd switch it back to the way it was when it did.

If you follow the directions here:
http://www.sanitarium.net/golug/rsync_backups.html,
you should be able to make a bootable copy in /dev/sda1 (or whatever the clone is called).

But I'm still not sure how you made your half size clone with dd or which disk /dev/hda is supposed to be in your lilo.conf. Where is LILO, by the way? In the MBR of the 80G disk or the 160G disk?
 
Old 05-19-2008, 06:37 PM   #6
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Slackware/Knoppix
Posts: 1,761
Blog Entries: 14

Rep: Reputation: 267Reputation: 267Reputation: 267
Found something, maybe you've seen before re DSL/pendrive:
http://www.pendrivelinux.com/index.php
 
Old 05-19-2008, 08:14 PM   #7
ogoy
LQ Newbie
 
Registered: Mar 2007
Posts: 7

Original Poster
Rep: Reputation: 0
Hi! Yes I boot off /dev/sdb1 as /dev/sda1 is not bootable. To answer your question, /dev/sda1 is not a clone of /dev/sdb1, they are two totally different hard disks. What I did was stick in the clone in my old ubuntu environment (/dev/sdb1) and mounted it as /dev/sda1.

The rsync link is awesome thanks man The pendrive site yeah, thats where I got my DSL.

I might have to go the easy way and just chroot into the disk and run the stuff from there...
 
  


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
making lilo bootable disk webinsek Linux - Newbie 3 04-03-2006 10:59 PM
making a bootable install disk from a downloaded iso Draylath Linux - Newbie 7 08-14-2004 04:54 PM
Making a bootable rescue-disk/mini-distro CD with LFS? dushkinup Linux From Scratch 5 04-15-2004 04:06 PM
Making a bootable floppy disk SMB3Master General 4 10-26-2003 07:25 AM
making a bootable disk udayan Programming 2 07-15-2002 12:03 PM


All times are GMT -5. The time now is 07:15 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