Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )

Advanced DNS Management
New ZoneEdit. New Managment.


Sign Up Now
Reply to this topicStart new topic
> Config Grub For New Disk Setup, How to let Grub know I changed my disks
post Aug 18 2003, 07:35 AM
Post #1

Whats this Lie-nix Thing?

Group: Members
Posts: 9
Joined: 7-August 03
Member No.: 1,222

I have a 15 GB hard drive as master on my first IDE channel which contains the MBR for Grub, since the rest of the drive is dedicated to running Windows98. My slave drive is a 30 GB drive and is dedicated to linux, my swap partition and one other partition, which I am not sure what it does. The second IDE channel has my DVD and CD-RW drives as master/slave.
What I really want to do, is replace my 15 GB and 30 GB drive combo with a single 80 GB drive and somehow get my linux installation from the 30 GB drive over to my 80 GB drive and then tell Grub to boot linux off of this drive.
I tried running fdisk /dev/hdb and then used choice a to make the first partition on the 30 GB drive a boot partition. I then chose w to write the changes. I looked at /boot/grub/menu.lst, but didn't understand what to change so I left it. I then went into /etc/fstab and told it to look at /dev/hda3 as the swap space (because right now it is hdb3 on the slave 30 GB drive). When I pull the 15 GB drive, put the 30 GB in the master position and restart, I just get a grub> prompt. No boot. Why? I did this, because I was going to move on to my second step of cloning the 30 GB drive to my 80 GB drive and then I'd be done. Is this the best method? Also, why can't I boot from the 30 GB drive after making the changes? Please specifically tell me what I am missing.

Go to the top of the page
+Quote Post
post Aug 18 2003, 06:52 PM
Post #2

Its GNU/

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151

OK, there are many ways to do this ... I think the easiest is like this:

1. Remove the master DVD on the secondary channel ... leave the CD-RW as slave and set the new 80gb drive as master. If you haven't already installed windows 98 on the 80gb drive, create the following partitions on the new drive usinf fdisk from linux bootup .... the 80gb drive should be /dev/hdc ... so fdisk /dev/hdc

hdc1 - 10 - 40gb (for windows 98) (change the type to c for win95 fat32 lba)
hdc2 - 256mb for linux boot (use type 83 for linux)
hdc3 - 1024mb for linux swap (use type 82 for linux swap)
hdc4 - the rest for linux / (use type 83 for linux)

set hdc1 to bootable ...

exit fdisk ...

make the filesystems for linux ... I would use ext3 for /boot (/dev/hdc2) and either ext3 or reiserfs for / (/dev/hdc4)

the commands would be:

mke2fs -j /dev/hdc2

mke2fs -j /dev/hdc4

mkswap /dev/hdc3

then you want to mount your new drives to copy all the info from the linux system to the new drives ...

mkdir /mnt/boot
mkdir /mnt/root

mount /dev/hdc2 /mnt/boot
mount /dev/hdc4 /mnt/root

cd /boot
cp -R * /mnt/boot/

cd /

for every directory under / except /mnt, /proc and /boot, issue the following command:

cp -R directory_name /mnt/root

after you do all the directories, issue the following commands

mkdir /mnt/root/boot
mkdir /mnt/root/mnt
mkdir /mnt/root/mnt/floppy
mkdir /mnt/root/mnt/cdrom
mkdir /mnt/root/mnt/dvd
mkdir /mnt/root/proc

then cd /mnt/root/etc

edit your fstab file and change the following:

set the root partition to /dev/hda4
set the swap partiton to /dev/hda3
set the boot partition to /dev/hda2

then cd /mnt/boot/grub

edit the file menu.lst and change any (hd1,0) to (hd0,1) ... change the root section to root=/dev/hda4 and the windows section to (hd0,0).

cd / and unmount /dev/hdc2 and hdc4 ... then shutdown the pc ... change the 80gb and the windows drive and you should be able to boot to Linux.

once your linux is good, you can change your drives back, boot to windows and backup the windows drive (I would use Stomp BackupMyPC) ... then swap the drives (with the 80gb drive as primary master) and use a win98 setup floppy to format the win 95 fat32 partition (format c: /s) and restore the win98 backup ... you might also need to boot to your old setup and redo the 80gb boot mbr to LILO after restoring the win98 partiton.

Johnny Hughes
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 18th July 2018 - 06:03 AM