LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Grub being annoying (https://www.linuxquestions.org/questions/linux-newbie-8/grub-being-annoying-829972/)

MrMakealotofsmoke 09-02-2010 12:01 PM

Grub being annoying
 
hello,
in my file server i have linux installed on a IDE hard drive. I also have about 9 SATA hard drives in raid configs and a single SATA on its own.

I have sda->sdk and also hdi. For some reason the IDE hard drive is hdi and not hda, dunno why lol.

The issue i have is that grub is installed on sda (the single non-raid hard drive) so sometimes when i try to start the server it decides to try and boot off sda and not hdi.

I have put the UUID of the IDE hard drive (OS drive) in the menu.lst and that works, but for some reason after a few days or so i notice the UUID entry missing from the menu.lst.

How can i fix this? Its really annoying to have to try and fix grub once its trying to boot from sda (gotta find liveCD etc, very annoying).

Thanks

yooy 09-02-2010 12:49 PM

Can you install another grub on sata hard drive? just a try

wikapuki 09-02-2010 12:52 PM

Cant see how this would keep chaning unless its after a grub update. On my debian box in file:
/etc/default/grub

there is:
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
GRUB_DISABLE_LINUX_UUID=true

As you can see I had the exact opposite problem to you, in that I hate the UUID and prefer old fashioned /dev/??? so I took my UUID out and then had to set this to true to make sure GRUB never used UUID again. So check this is still commented out for your purpose.

smoker 09-02-2010 01:52 PM

Did you install from a live cd ?

MrMakealotofsmoke 09-02-2010 08:06 PM

No i didnt install from a liveCD.

Im running Debian btw lol. I cant install grub to another hard drive. When i do grub, then setup (hd im given hd0 through to hd7) it throws this error:

setup (hd1,0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... no

Error 15: File not found

Gives the same error from hd0 to hd7. None of the hd's are the linux IDE hard drive as none of them have more than 1 partition (linux, swap, etc).

MrMakealotofsmoke 09-03-2010 07:41 AM

anyone?

mostlyharmless 09-03-2010 06:45 PM

Clearly you have an unusual setup, else your IDE drive wouldn't show up as hdi instead of hda, and, in fact, in newer distros, even IDEs show up as sdX instead of hdX. So whatever's going on with that is one possibility.

wikapuki made a good suggestion in that the situation shouldn't change unless either you have flaky hardware (eg a drive that isn't always ready at boot time), or the software update is changing the situation and your setup is not what is expected by it.

It might help diagnose the situation if you say which version of Debian you're using, and provide some more detailed information about your drives, ie fdisk -l, mount, and so forth.

In so far as grub is concerned, where do you think the grub files are? If you can find them, so can grub.
Try "find /boot/grub/stage1" and see if different variations on the path help.

Hope that gets the ball rolling again.

MrMakealotofsmoke 09-04-2010 08:54 AM

fdisk -l
Quote:

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x99958f40

Device Boot Start End Blocks Id System
/dev/sda1 1 121601 976760001 83 Linux

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0007f575

Device Boot Start End Blocks Id System
/dev/sdb1 1 121601 976760001 fd Linux raid autodetect

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x9a1ec182

Device Boot Start End Blocks Id System
/dev/sdc1 1 121601 976760001 fd Linux raid autodetect

Disk /dev/hdi: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xab85ab85

Device Boot Start End Blocks Id System
/dev/hdi1 * 1 6994 56179273+ 83 Linux
/dev/hdi2 6995 7297 2433847+ 5 Extended
/dev/hdi5 6995 7297 2433816 82 Linux swap / Solaris

Disk /dev/sdd: 1000.2 GB, 1000203804160 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000cc8b5

Device Boot Start End Blocks Id System
/dev/sdd1 1 121601 976760001 fd Linux raid autodetect

Disk /dev/sde: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x1023e56c

Device Boot Start End Blocks Id System
/dev/sde1 1 182401 1465136001 fd Linux raid autodetect

Disk /dev/sdf: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0001a229

Device Boot Start End Blocks Id System
/dev/sdf1 1 121601 976760001 fd Linux raid autodetect

Disk /dev/sdg: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00071f8f

Device Boot Start End Blocks Id System
/dev/sdg1 1 60801 488384001 fd Linux raid autodetect

Disk /dev/sdh: 500.1 GB, 500106780160 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x63c8fa26

Device Boot Start End Blocks Id System
/dev/sdh1 1 60801 488384001 83 Linux

Disk /dev/sdi: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0006391e

Device Boot Start End Blocks Id System
/dev/sdi1 1 182401 1465136001 fd Linux raid autodetect

Disk /dev/sdj: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xae11681e

Device Boot Start End Blocks Id System
/dev/sdj1 1 182401 1465136001 fd Linux raid autodetect

Disk /dev/sdk: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x3d94df1f

Device Boot Start End Blocks Id System
/dev/sdk1 1 182401 1465136001 fd Linux raid autodetect

Disk /dev/md0: 3000.6 GB, 3000606523392 bytes
2 heads, 4 sectors/track, 732569952 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk identifier: 0x00000000

Disk /dev/md0 doesn't contain a valid partition table

Disk /dev/md1: 4500.8 GB, 4500897595392 bytes
2 heads, 4 sectors/track, 1098851952 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk identifier: 0x00000000

Disk /dev/md1 doesn't contain a valid partition table

Disk /dev/md5: 1000.2 GB, 1000210300928 bytes
2 heads, 4 sectors/track, 244191968 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk identifier: 0x00000000

Disk /dev/md5 doesn't contain a valid partition table

Disk /dev/dm-0: 4500.8 GB, 4500895039488 bytes
255 heads, 63 sectors/track, 547202 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 3000.6 GB, 3000605081600 bytes
255 heads, 63 sectors/track, 364802 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-1 doesn't contain a valid partition table

fstab
Quote:

proc /proc proc defaults 0 0
/dev/hdi1 / ext3 defaults,errors=remount-ro 0 2
/dev/sda1 /media/hdd1 ext3 defaults 0 0
/dev/dm-1 /media/raid1 ext3 defaults 0 0
UUID="7871c836-bd0b-48d4-b731-06c96fa7a2af" / ext3 errors=remount-$
/dev/hda5 none swap sw 0 0
/dev/hdb /media/cdrom0 udf,iso9660 user,noauto 0 0


/dev/md5 /media/tmp ext3 defaults 0 0
/dev/lvm-md1/Files-Movies /media/raid2 ext3 defaults 0 0
RAID
Quote:

Version : 00.90
Creation Time : Wed Mar 31 01:37:19 2010
Raid Level : raid5
Array Size : 2930279808 (2794.53 GiB 3000.61 GB)
Used Dev Size : 976759936 (931.51 GiB 1000.20 GB)
Raid Devices : 4
Total Devices : 4
Preferred Minor : 0
Persistence : Superblock is persistent

Update Time : Sat Sep 4 23:47:54 2010
State : clean
Active Devices : 4
Working Devices : 4
Failed Devices : 0
Spare Devices : 0

Layout : left-symmetric
Chunk Size : 64K

UUID : 1857eb01:cc613ac3:d03374e0:37ba532a
Events : 0.660738

Number Major Minor RaidDevice State
0 8 17 0 active sync /dev/sdb1
1 8 49 1 active sync /dev/sdd1
2 8 81 2 active sync /dev/sdf1
3 8 33 3 active sync /dev/sdc1
Quote:

Version : 00.90
Creation Time : Fri Apr 2 15:37:48 2010
Raid Level : raid5
Array Size : 4395407808 (4191.79 GiB 4500.90 GB)
Used Dev Size : 1465135936 (1397.26 GiB 1500.30 GB)
Raid Devices : 4
Total Devices : 4
Preferred Minor : 1
Persistence : Superblock is persistent

Update Time : Sat Sep 4 23:51:03 2010
State : active, degraded, recovering
Active Devices : 3
Working Devices : 4
Failed Devices : 0
Spare Devices : 1

Layout : left-symmetric
Chunk Size : 4K

Rebuild Status : 5% complete

UUID : 44fc3622:cf99fe69:5d53fc14:f3cbdc1c (local to host svrfile)
Events : 0.992941

Number Major Minor RaidDevice State
0 8 65 0 active sync /dev/sde1
1 8 145 1 active sync /dev/sdj1
4 8 161 2 spare rebuilding /dev/sdk1
3 8 129 3 active sync /dev/sdi1
Quote:

Version : 00.90
Creation Time : Sun May 30 19:10:04 2010
Raid Level : raid0
Array Size : 976767872 (931.52 GiB 1000.21 GB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 5
Persistence : Superblock is persistent

Update Time : Sat Sep 4 23:10:13 2010
State : active
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0

Chunk Size : 64K

UUID : ef31fd02:278dbfb1:5d53fc14:f3cbdc1c (local to host svrfile)
Events : 0.55

Number Major Minor RaidDevice State
0 8 97 0 active sync /dev/sdg1
1 8 113 1 active sync /dev/sdh1

MrMakealotofsmoke 09-04-2010 08:56 AM

find /boot/grub/stage1 gave me
Quote:

/boot/grub/stage1
i have in my file server as data drives (not OS etc)

/dev/md0 -> /dev/lvm-md0/Files-Other
RAID5 4x1TB /dev/sdb1 | /dev/sdd1 | /dev/sdf1 | /dev/sdc1
mount: /media/raid1


dev/md1 -> /dev/lvm-md1/Files-Movies
RAID5 4x1.5TB /dev/sde1 | /dev/sdj1 | /dev/sdk1 | /dev/sdi1
mount: /media/raid2


/dev/md5 -> ext3 (no lvm)
RAID0 2x500gb /dev/sdg1 | /dev/sdh1
mount: /media/tmp


dev/sda
Single Drive
mount: /media/hdd1

DevilFreeBSD 09-05-2010 03:00 AM

Grub 1. Use Grub 1. Grub 2 was not well thought out. Uninstall your grub, install grub legacy. I take grub 2 off as soon as possible. Its the Vista of bootloaders. Grub 1 is XP. Ask anyone still running Ubuntu 8.

mostlyharmless 09-05-2010 06:50 PM

Strange that "find" found the file but "setup" said it wasn't there. Or did I misunderstand? If the stage1 isn't on the OS disk, well then, you'd better put it somewhere accessible at boot time, like the OS disk. If I did misunderstand, then you might want to look at the more complicated "install" command, if they still have that for grub2...

mostlyharmless 09-06-2010 02:52 PM

Just to clarify: when you typed "find /boot/grub/stage1", what did it show? For example on my machine it says "(hd0, 1)" in response to "find /grub/stage1", but "File not found" to "find /boot/grub/stage1". It also makes a difference if I use grub from the command line or if I boot from a rescue/native install disk.

MrMakealotofsmoke 09-07-2010 12:24 AM

Quote:

Originally Posted by mostlyharmless (Post 4089721)
Just to clarify: when you typed "find /boot/grub/stage1", what did it show? For example on my machine it says "(hd0, 1)" in response to "find /grub/stage1", but "File not found" to "find /boot/grub/stage1". It also makes a difference if I use grub from the command line or if I boot from a rescue/native install disk.

"find /boot/grub/stage1" gives:
/boot/grub/stage1

"find /grub/stage1" gives:
find: `/grub/stage1': No such file or directory

This is from ssh logged in as root

MrMakealotofsmoke 09-07-2010 02:37 AM

sigh, just restarted the server and GRUB defaulted back to hda :/

mostlyharmless 09-07-2010 03:00 PM

hda? not sda or hdi? Was that a typo or is your hardware configuration not the same on every boot up? I noticed you had a /dev/hda5 for swap, but no hda listed by fdisk. And... I'm not sure why "grub> find" didn't give the locations of stage1 and just echoed it back.

Are you using grub2 or grub1? What version of Debian are you on? Heck I'm totally confused at this point as to what's going on.

If my machine was behaving in this manner, it'd be time to backup my data and reinstall/update the OS. Sorry.


All times are GMT -5. The time now is 10:52 PM.