LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-20-2008, 07:53 AM   #1
Zup
LQ Newbie
 
Registered: Apr 2006
Posts: 21

Rep: Reputation: 0
Grub fails to update after a disk change


Sorry, I think thisquestion is already answered, but I'm unable to find anything (I've searched with grub update but didn't find any answer).

I'm using Debian 4.0 Etch (AMD64) with some programs from the testing area. It was installed on a IDE hard disk, and the troubles started when I changed the disk to a SATA one.

My system had two hard disks (hda and hdb) and two optical drives (hdc and hdd). Now, the hard drives are sda and hda, and the optical drives remains as hdc and hdd.

After the disk change, it didn't work because all references in menu.lst were still pointing at hda. I changed to sda and everything works fine... until next kernel update.

Every time the kernel is updated, grub changes all references to hda, so Linux don't boot until I edit menu.lst. I've also changed /boot/grub/device.map, but it doesn't work.

How can I fix this problem?
 
Old 12-20-2008, 09:11 PM   #2
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
sounds like you did not change your /boot/grub/device.map

pls post the output....and if you can already see what to do...to help others research...post what you did...remember to edit with root powers pls

2) if you post and don't know what to do that is ok as well....

but I need you to describe the exact bios boot order

and then I need better description of your current drives...if sizes are diff that will do.

AND I would like you to remember you can have grub on each mbr...so for current drives...where exactly is grub?...relative to bios boot order.

its possible, for example for mbr to have been and stay on hdb...the untouched drive.

AND...can you look at your bios boot order to see if you can start hd IDE or sata before the other please and post if that is possible.

Ideally grub goes to the fastest drive...sata/scsi.

good luck
 
Old 12-20-2008, 09:57 PM   #3
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,716
Blog Entries: 3

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
menu.1st root=sda1 not hda anymora sata is scsi small computerized system intergrated. not a IDE intergrated device electronic big problem for me. try it and if it mapped as hda not sda then you will need hda not sda. visa versa. it is all in how it sees it. I have a hdc with a ubuntu on it when I loaded it it remapped every thing as sda. but the map on the hda1 was hda. so you know when I rebooted the system was reading the hdc menu.1fst file but would send it to hda1 and that map was hda1 and it would not boot. so after I install systems and get them runing I boot my hda1 system reinstall grub then go to my multiple systems cut and paste there entries into hda1 menu1st. because after I reinstall grub on hda1 it boot everything from there. this was not a isuue till sata my friend came along and all the new system just call everything sda 1 2 3 etc when they actually are hda. IDE.
good advice keep a copy of super grub so you can fix anything and keep as simple kernel link vmlinuz ---> kernel 2.6.24-22-generic this way you just throw in super grub and boot vmlinuz. root=sd1 etc etc.
 
Old 12-21-2008, 07:20 AM   #4
Zup
LQ Newbie
 
Registered: Apr 2006
Posts: 21

Original Poster
Rep: Reputation: 0
OK, there's some additional data:

- The hard disks are a Seagate ST3500320AS (SATA, 500 Gb, /dev/sda) and a Maxtor 6B200P0 (IDE, 200 Gb, /dev/hda). The Maxtor drive was previously /dev/hda, and there was a 80Gb drive as /dev/hdb. Partitions were copied used Acronis software.

- There are three OSs in /dev/sda. MS-DOS (/dev/sda1), Linux (/dev/sda2) and Windows XP SP3 (/dev/sda3). Also there are some data partitions. In /dev/hda there are only a data partition and the Linux swap.

- First time it happened, I edited device.map. The contents are:
Code:
(fd0)   /dev/fd0
(hd0)   /dev/sda
(hd1)   /dev/hda
(I don't know if I've got to run a program after editing device.map).

- BIOS hard disk boot order is first SATA, then IDE. Boot order is Hard disk, then CDROM, then Floppy.

- Grub is installed in MBR in /dev/sda. It's not installed on /dev/hda, as I feel it's not needed there.

Actually, every time I forget to change menu.lst, I edit the menu entry from Grub, get into the system and edit menu.lst from there.
 
Old 12-21-2008, 12:47 PM   #5
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,716
Blog Entries: 3

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
this will help you. http://www.supergrubdisk.org/
 
Old 12-21-2008, 01:11 PM   #6
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
What does the "# kopt=...." line look like in your menu.lst? Please post the full contents of your menu.lst so we can see if the " AUTOMAGIC KERNELS" options in the menu.lst are OK.
 
Old 12-21-2008, 01:53 PM   #7
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,716
Blog Entries: 3

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
this looks like a basic grub install question. what college course are you doing.
 
Old 12-21-2008, 03:25 PM   #8
Zup
LQ Newbie
 
Registered: Apr 2006
Posts: 21

Original Poster
Rep: Reputation: 0
CJS got me. I readed fast menu.lst, and I overlooked every commented line, believing that those lines doesn't do nothing. #kopt has a reference to hda2, corrected. Thanks for your help.
 
Old 12-21-2008, 03:26 PM   #9
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
Glad to hear that solved the problem. Cheers and have fun in LinuxLand.
 
  


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
Unable to upgrade to ubuntu 7.10, update manager fails to update.... jonbvgood Linux - Software 2 02-05-2008 03:58 PM
Motherboard change impacts disk naming, requires grub reconfiguration? donv2 Linux - General 5 09-06-2006 12:45 PM
Grub 0.97 issues on slackware - grub-install is very slow, & updating menu.lst fails dieyouspammer Linux - Software 1 02-27-2006 01:06 PM
GRUB fails to install on sata disk with Ubuntu 5.04 nonutopia Linux - Software 5 08-16-2005 03:09 AM
Grub Fails after installing new IDE disk silversurfer Linux - Newbie 3 03-11-2004 10:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:28 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
Open Source Consulting | Domain Registration