grub and start issues

I have 3 systems which failed on me at the same time.

  1. work desktop with freshly installed 11.3 everything is fine with instalation but when rebooted I get missing operating system, so I have to boot from disk and update the os every time. What should I do? played with boot loader but was not able to find the right option and I stopped messing around.

  2. my home desktop lost my OpenSuse 11.1 - 64 bit, starting partition from harddisk and was going to win directly. I repaired it with the installation disk but now it starts and stops at grub. that’s it just a terminal with grub> and prompt. Most probably grub doesn’t know where is the partitions and the partition used is not the correct one. Not sure how to navigate from it as none of the commands which i list with tab are familiar to me.

  3. my laptop had the same symptoms but the installation disk for 11.1 - 32 bit recovered the system but lost Windows partition:
    here are the commands needed to be able to add the entry in the grub but not sure if i know exactly which one to use:
    bonaire:/home/dan # fdisk -l

Disk /dev/sda: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x30ff8ef5

Device Boot Start End Blocks Id System
/dev/sda1 1 784 6297448+ 12 Compaq diagnostics
/dev/sda2 785 7312 52436160 7 HPFS/NTFS
/dev/sda3 * 8209 12161 31752472+ f W95 Ext’d (LBA)
/dev/sda4 7313 7509 1582402+ 82 Linux swap / Solaris
/dev/sda5 8209 10557 18868311 83 Linux
/dev/sda6 10558 12161 12884098+ 83 Linux

Partition table entries are not in disk order
bonaire:/home/dan # cat /etc/fstab
/dev/disk/by-id/ata-TOSHIBA_MK1031GAS_Z58P1118S-part4 swap swap defaults 0 0
/dev/disk/by-id/ata-TOSHIBA_MK1031GAS_Z58P1118S-part5 / ext3 acl,user_xattr 1 1
/dev/disk/by-id/ata-TOSHIBA_MK1031GAS_Z58P1118S-part6 /home ext3 acl,user_xattr 1 2
/dev/disk/by-id/ata-TOSHIBA_MK1031GAS_Z58P1118S-part2 /windows/C ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
bonaire:/home/dan # cat /boot/grub/menu.lst

Modified by YaST2. Last modification on Fri Aug 20 16:05:13 EDT 2010

default 0
timeout 8
gfxmenu (hd0,4)/boot/message
##YaST - activate

###Don’t change this comment - YaST2 identifier: Original name: linux###
title SUSE LINUX
root (hd0,4)
kernel /boot/vmlinuz root=/dev/disk/by-id/ata-TOSHIBA_MK1031GAS_Z58P1118S-part5 repair=1 resume=/dev/disk/by-id/ata-TOSHIBA_MK1031GAS_Z58P1118S-part4 splash=silent showopts vga=0x314
initrd /boot/initrd

###Don’t change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe – SUSE LINUX
root (hd0,4)
kernel /boot/vmlinuz root=/dev/disk/by-id/ata-TOSHIBA_MK1031GAS_Z58P1118S-part5 showopts ide=nodma apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 x11failsafe vga=0x314
initrd /boot/initrd

========================
Would it be : hd(0,3)?

Thanks

###Don’t change this comment - YaST2 identifier: Original name: windows###
title Windows
rootnoverify (hd0,1)
chainloader +1

Lots of info at swerdna’s
GRUB Boot Multiboot openSUSE Windows (2000, XP, Vista) using the Grub bootloader.
HowTo Boot into openSUSE when it won’t Boot from the Grub Code on the Hard Drive

Thank you. I forgot about swerdna’s site. I will read there and hopefully get more info.

i reopened my home desktop(item #2) and it seems that one of the hard drives which on which i have windows and the linux swap partition has issues. I will backup the info on another drive and try to format it. Would it be possible to somehow create just the swap partition on the other disk so it can start ? the curious thing is that windows started before, but anyway what should i do after i backup everything? how can i get a new swap partition? only by reinstalling? maybe then would be better to install 11.3?
thanks

It sounds like you are telling me you repaired or re-installed windows and then tried to repair grub with the SUSE disk and it didn’t work.
If I had the PC in my sweaty little palms I’m sure I could sort it in a jiffy. It would have been easier if you hadn’t tried the repair first.
As for creating a swap on a different disk, yes, but it’s complicated.

Honestly, considering the life of 11.1 I would consider updating it to 11.2 or 11.3

And I’m trying to recall if it was 11.1 that had the broken repair on the DVD!?

Chances are you don’t have a backup of your original working menu.lst before the repair attempt do you? And without all the fdisk -l detail it’s difficult to know exactly what you can do. You should get yourself parted Magic if you don’t have it already, it’s very handy in situations like this.

might not be related to your issue, but you check LBA for your HD in bios settings?

I think i was not clear on this as i had too many items with small issues:
this is my home desktop with 11.1 64 bit. yesterday was booting directly to windows. i looked at it with parted magic which can see all the drives and tried to repair it with the installation disk for 11.1. I didn’t touch windows which i don’t use (my wife still needs it). The repair got me nowhere just to the grub prompt. I opened again with parted magic and I got errors when scanning the harddrive with windows and the swap partition(they are on the same drive for some reason i cannot recall).
I’m backing up right now on an external drive the contents of the harddrive and then i will backup the 11.1 home directory( i hope that’s all needed) and i will try to get to grub and see if i can get any more info.
if not successfull i will have to install 11.3. which might be challenging since i have an old ATI card but that was and it is the challenge i have to deal with.
i will post in few minutes the result of fdisk -l and the other commands when I will log in from it via Parted magic network

No harm in trying this:
Re-Install Grub Quickly with Parted Magic

That’s exactly what i was thinking to do after you gave me sverdna’s link. I did it now and I will reboot the system, hopefully i’m lucky if not i will post the details.

That was my guide. John has similar info.
I have to sleep now here in UK

Thanks caf and Have a good night!
well the grub commands didn’t help so i will post the output of the commands:
root@PartedMagic:~# fdisk -l

Disk /dev/hda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x8d308d30

Device Boot Start End Blocks Id System
/dev/hda1 1 1902 15277783+ 7 HPFS/NTFS
/dev/hda2 1903 15926 112647780 7 HPFS/NTFS
/dev/hda3 * 15927 19457 28362757+ f W95 Ext’d (LBA)
/dev/hda5 15927 19457 28362726 82 Linux swap / Solaris

Disk /dev/hdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x69205244

Device Boot Start End Blocks Id System
/dev/hdb1 1 2611 20972826 83 Linux
/dev/hdb2 2612 24321 174385575 83 Linux

root@PartedMagic:~# cat /etc/fstab
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
devpts /dev/pts devpts gid=4,mode=620 0 0
shm /dev/shm tmpfs defaults 0 0
usbfs /proc/bus/usb usbfs devgid=14,devmode=0660 0 0
/dev/hda1 /media/hda1 ntfs-3g defaults 0 0 #harddisk
/dev/hda2 /media/hda2 ntfs-3g defaults 0 0 #harddisk
/dev/hdb1 /media/hdb1 auto defaults 0 0 #harddisk
/dev/hdb2 /media/hdb2 auto defaults 0 0 #harddisk
/dev/hdc /media/cdrom1 auto defaults,ro 0 0 #cdrom

root@PartedMagic:~# cat /boot/grub/menu.lst
cat: can’t open ‘/boot/grub/menu.lst’: No such file or directory

any suggestions? or should i just backup and install 11.3?

With Parted magic mount the hdb1 and browse to /boot/grub/menu.lst and open with leafpad or whatever editor your Parted has.
Post the content here. So you may have to save it to a pen drive to get it here, if Parted is not online.

Whilst in the directory /boot/grub
See if there are also any files named: ~menu.lst or menu.lst.old or menu.lst.bak
If there are, get those too, you may have to right click open with to read those.

Also go to
/etc/fstab
and get it’s contents, what you posted is not the right info.

Also. What boot order are HD’s in BIOS

Backups always good policy, make sure you include configuration files (/etc), hidden files in /home/userid (~/), applicationl files in /var.

You can turn off swap (and delete it from the /dev/hda), giving the space back to Windows with PartedMagic (I think).
Meanwhile you can create a file to use as your swap file on /dev/hdb.


# man swapoff 
#  **under normal openSUSE not PartedMagic**  
sudo swapoff -ve
#  create an empty zero filled file about 1.5G
#    probably need su privileges 
sudo dd if=/dev/zero of=/swapfile bs=1024 count=1520000
sudo mkswap   /swapfile
sudo swapon -v  /swapfile

The cat /etc/fstab you’ve run it under partition magic it doesn’t show your actual.
Pls try again


## I think it should be
cat /media/hdb1/etc/fstab
cat /media/hdb1/boot/grub/menu.lst

Re: Grub commands instead of looking for menu.lst try looking for the stage1


grub> find /boot/grub/stage1
##  or because I'm unfamiliar with PartedMagic
grub> find /media/hdb1/boot/grub/stage1

Sorry for late reply, but having issues on multiple machines at home and at work I had to focus on whichever was closer to me and at least I fixed the one at work by deleting and formatting completely everything and reinstalling again 11.3. Everything works perfect. Only noticed that i had to install it twice the OS. First time would give lots of errors with some packages and second time working like a charm. This happened to me first when I installed it but at that time i blamed it on the XP which was taking most of the space leaving only like 5GB for home and another 5GB for the rest. Anyway when I will install it on the laptop, as soon as my desktop at home works I will see if this behaviour persists.
So to answer to caf: menu.lst is identical to menu.lst.old and has these contents:

Modified by YaST2. Last modification on Sun Aug 22 09:21:55 EDT 2010

timeout 8
default 0
gfxmenu (hd1,0)/boot/message

I backed up everything on an external drive which is a 1TB, so I have everything in /etc; /home; /opt; /var; xorg.conf; sound; and the output of /etc/fstab
/dev/disk/by-id/ata-ST3200822A_3LJ1L9Y6-part1 / ext3 acl,user_xattr 1 1
/dev/disk/by-id/ata-ST3160812A_5LS9HFWV-part5 swap swap defaults 0 0
/dev/disk/by-id/ata-ST3160812A_5LS9HFWV-part1 /windows/C ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/disk/by-id/ata-ST3160812A_5LS9HFWV-part2 /windows/D ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
/dev/disk/by-id/ata-ST3200822A_3LJ1L9Y6-part2 /home ext3 defaults 1 2
and the other commands from the sticky notes posted
I need to reboot to find the order of the HD’s in bios, but that shouldn’t have change as it worked before and then it stopped working , but i will post shortly.
well it seems that i was fast and was able to log out and in in time to edit
the primary one is the one with windows and the swap partition(ST3160812A) - hda

Are you saying this

Modified by YaST2. Last modification on Sun Aug 22 09:21:55 EDT 2010

timeout 8
default 0
gfxmenu (hd1,0)/boot/message

Is the content of menu.lst ?

If you are, then it’s Jeffed.

But I am quite mixed up what PC we are working on now. So for each machine that you need help on, in a single post per machine give me:
fdisk -l
cat /etc/fstab
cat /boot/grub/menu.lst
And boot order of HD’s if more than one

Only the home desktop with 11.1-64 bit has issues, the other 2 were fixed.
So that’s the fstab on the machine.
> /etc/fstab
/dev/disk/by-id/ata-ST3200822A_3LJ1L9Y6-part1 / ext3 acl,user_xattr 1 1
/dev/disk/by-id/ata-ST3160812A_5LS9HFWV-part5 swap swap defaults 0 0
/dev/disk/by-id/ata-ST3160812A_5LS9HFWV-part1 /windows/C ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/disk/by-id/ata-ST3160812A_5LS9HFWV-part2 /windows/D ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
/dev/disk/by-id/ata-ST3200822A_3LJ1L9Y6-part2 /home ext3 defaults 1 2

> fdisk -l

Device Boot Start End Blocks Id System
/dev/hda1 1 1902 15277783+ 7 HPFS/NTFS
/dev/hda2 1903 15926 112647780 7 HPFS/NTFS
/dev/hda3 * 15927 19457 28362757+ f W95 Ext’d (LBA)
/dev/hda5 15927 19457 28362726 82 Linux swap / Solaris

Device Boot Start End Blocks Id System
/dev/hdb1 1 2611 20972826 83 Linux
/dev/hdb2 2612 24321 174385575 83 Linux

boot order:
ST3160812A - (hda) - primary
ST3200822A - (hdb) - secondary
CD-ROM

OK. Please try adding this to your menu.lst
Parted Magic is a good tool for this:

#Don't change this comment - YaST2 identifier: Original name: none#
title      openSUSE 11.1
root       (hd1,0)
kernel     /vmlinuz root=/dev/hdb1 ro quiet splash
initrd     /initrd.img

See what it does

But I think - once you have edited the menu.lst you may need to do this:
Re-Install Grub Quickly with Parted Magic

well it seems still no luck. Now I get this:
root (hd1,0)
Filesystem type is ext2fs, partition type 0x83
kernel /vmlinuz root=/dev/hdb1 ro quiet splash

Error 15: File not found

Press any key to continue…

#Don't change this comment - YaST2 identifier: Original name: none#
title      openSUSE 11.1
root       (hd1,0)
kernel     /boot/vmlinuz root=/dev/hdb1 ro quiet splash
initrd     /boot/initrd

OK

Try the above, see if that works

unfortunately the same result.
Error 15: File not found
Should I give up and try installing 11.3?