LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-02-2005, 10:34 AM   #1
dlublink
Member
 
Registered: Oct 2004
Location: Canada
Distribution: Ubuntu
Posts: 330

Rep: Reputation: 30
removed hda, boot from hdb


Hi.

I had a 120 gig as /dev/hda
I had a 40 gig as /dev/hdb
I had grub boot loader in hda's mbr.

I have removed the 120gig leaving me with a 40 gig.

I cannot boot. I tried changing the setting's for grub and installed it in the mbr of hdb, didn't work.

I tried putting lilo in the hdb's mbr and it says:
LI 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01

I tried moving the 40 gig to hda. And I updated that fstab, but than it would not boot past "creating devices".

Any thoughts on how to make this machine bootable again without reinserting the 120gig?

Thanks,

David
 
Old 02-02-2005, 11:48 AM   #2
Tuttle
Senior Member
 
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,291

Rep: Reputation: 52
did you run lilo from hdb or from a rescue disk?
to run it, the best way is to boot into a rescue disk, enter a console, then:
Code:
mount /dev/hdb1 /mnt # where hdb1 is the root / partition
vim /mnt/etc/lilo.conf # change to "boot=/dev/hdb"
chroot /mnt /sbin/lilo
 
Old 02-02-2005, 12:15 PM   #3
dlublink
Member
 
Registered: Oct 2004
Location: Canada
Distribution: Ubuntu
Posts: 330

Original Poster
Rep: Reputation: 30
The trouble is their was no bootloader on hdb. It was on hda. I managed to get grub installed, unfortunatly I have to type:

root (hd0,1)
kernel /boot/vmlinuz some parameters
initrd /boot/initrd
boot

each time.
I made entries in the /boot/grub/menu.lst file
color white/blue black/light-gray
default Linux
timeout 2

title Linux
kernel (hd0,1)/boot/vmlinuz root=/dev/hdb2 selinux=0 splash=silent resume=/dev/hdb1 desktop elevator=as showopts
initrd (hd0,1)/boot/initrd


But I still have to manually boot from grub each time. What step have I missed?

Thanks,

David
 
Old 02-02-2005, 04:49 PM   #4
Tuttle
Senior Member
 
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,291

Rep: Reputation: 52
I'm not used to grub as I use lilo, are you sure it's "(hd0,1)" and not "(hd1,1)"?
Here is the documentation.
 
Old 02-02-2005, 08:28 PM   #5
Soobwrex
LQ Newbie
 
Registered: Feb 2005
Location: Fairbanks, Alaska
Distribution: Fedora Core 3
Posts: 13

Rep: Reputation: 0
I'm new to linux but I found the file

/etc/grub.conf

which contains all the options that grub boots with, You might try putting your options in that you have to type each time.
Here is my grub.conf file

grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,1)
# kernel /boot/vmlinuz-version ro root=/dev/hda2
# initrd /boot/initrd-version.img
#boot=/dev/hda
default=0
timeout=5
splashimage=(hd0,1)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.9-1.667)
root (hd0,1)
kernel /boot/vmlinuz-2.6.9-1.667 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.9-1.667.img
title Windows XP
rootnoverify (hd0,0)
chainloader +1
 
Old 03-02-2005, 11:44 PM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
Quote:
kernel (hd0,1)/boot/vmlinuz root=/dev/hdb2 selinux=0 splash=silent resume=/dev/hdb1 desktop
On this line, you have the root partition on hdb2, while what you typed in manually
Quote:
root (hd0,1)
has the root partition on /dev/hda2.

If your system boots up with the manual version, change grubs 'menu.lst' file to reflect what works.

Since the old hdb drive is now the new hda drive, you need to change your information in /etc/fstab also.

If you decide to use lilo instead, make sure that running /sbin/lilo is successful before rebooting.
It should print out one line for each linux section. If there is a problem, then the mbr won't be updated properly and you will either get what you had before, or it will complain about not finding init.
 
Old 03-03-2005, 12:19 AM   #7
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
When you remove hda, then hdb becomes remapped as hda.

You have to install grub on this drive in the mbr. Read the docs on grub, and just start it and install it. After you have done this it should find your menu.lst and everything will boot.
 
  


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
How to prevent search for HDA and HDB on boot? solstice123 Linux - General 5 10-23-2004 07:32 PM
dual boot - hda & hdb - both Linux tw001_tw Slackware 8 09-07-2004 07:36 PM
How can I boot either one of my hard drives /dev/hda or /dev/hdb, I have RH9 and FC2 omogunkristi Linux - General 1 06-21-2004 05:11 AM
Can I swap hda and hdb? snatale1 Linux - Hardware 1 03-10-2004 01:23 AM
lilo dual boot two linux distros / hda and hdb rioguia Linux - Newbie 2 01-23-2003 12:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

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