LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Creating Bootable CDROM (https://www.linuxquestions.org/questions/linux-newbie-8/creating-bootable-cdrom-206055/)

lfloridays 07-16-2004 07:28 PM

Creating Bootable CDROM
 
Hope someone can help,.....

I am using Redhat Linux

I have a new HD and I am replacing an old smaller hard disk with this new one.

Using Acronis 7.0 I cloned the (old)40Gig HD to the new (new) 250Gig HD. Acronis will automatically increase partitions sizes relative to the old partitions. I followed the standard prompts. When finished I switched the Master HD cable to 250Gig drive and took out the 40 gig drive. When i boot up the new 250Gig HD it hangs up - I believe at the GRUB loader.

If I copy an image of the 40Gig HD to the new 250HD using the Acronis Restore option then the new HD boots properly - BUT the partitions are not increased in size and i waste space.

I think i need to boot from a bootable floppy and make some changes using the GRUB command - but I don't have a floppy drive for this system.

Questions:

1. How can I make a CD-ROM that I can boot from to get into my HD and make the GRUB changes? (I don't have the Linux installation CDROM available to me - it is located at my company HQ a few states away!)

2. What GRUB commands would I need to run to make the HD bootable?

Thanks for your help on this.

Lleb_KCir 07-16-2004 07:57 PM

cant help you with grub, but you might want to try knopixx instead of making a bootable CD.

lfloridays 07-16-2004 08:26 PM

Thanks - Being a Newbie - i am not familiar with Knopixx - but i will do some research.

/bin/bash 07-17-2004 06:59 AM

I just installed my new 120G drive a month ago. My 40G drive had 13 partitions. What I did was I made partitions on the new drive which were big enough to hold all the data from the old partitions, plus I gave myself some breathing room. I then used rsync to copy the partitions one at a time. You could also use dd to copy the data.

First download one of the small Linux distributions available. Check www.linux.org for more. Here are some popular rescue systems which boot off CD.
Code:

LNX-BBC 
Website:        http://www.lnx-bbc.org/

Damn Small Linux 
Website:        http://www.damnsmalllinux.org

tomsrtbt 
Website:        http://www.toms.net/rb/

Lets say you have 3 partitions on old 40G drive, and you have it installed as
hdb. Suppose the partitions look like this:
hdb1 = vfat - Windows
hdb2 = ext3 - Linux
hdb3 = swap - Linux-swap

Then you partition the new hda with 3 partitions and you format the partitions with matching filesystems. Now you are ready to transfer the data.


Once you boot the cd you just need to:
  1. Mount the partitions and transfer the data. -OR-
  2. Use dd to transfer the data.

Here is how you would use rsync.

mkdir /hda /hdb
mount /dev/hda1 /hda
mount /dev/hdb1 /hdb
rsync -a /hda/ /hdb/
umount /hda
umount /hdb
mount /dev/hda2 /hda
mount /dev/hdb2 /hdb
rsync -a /hda/ /hdb/
mkswap /dev/hda3

If you instead wanted to use dd, this would work.

dd if=/dev/hdb1 of=/dev/hda1 bs=512 skip=1 seek=1
dd if=/dev/hdb2 of=/dev/hda2 bs=512 skip=1 seek=1
mkswap /dev/hda3

The skip and seek make sure you dont overwrite the boot sectors on the destination.

Now dd seems easier to use however it will take longer because it will copy the entire partition (including unused space.)

Once you finish copying the data you just need to run lilo or grub to reinstall the bootloader.

With /dev/hda2 mounted at /hda you can run lilo like this:
lilo -r /hda

Now you should be able to boot your new drive.


All times are GMT -5. The time now is 02:50 AM.