Author Topic: {SOLVED} GRUB and menu.lst having fun with me  (Read 1067 times)

Online wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2430
  • Any Bugs in site?
{SOLVED} GRUB and menu.lst having fun with me
« on: May 10, 2011, 10:20:48 PM »
Final Diagnosis:  Windows XP partition absolutely cleaned out, still formatted ntfs
============================================================
I am not sure what is going on, I had prepared a pc for my wife with XP only on the first partition single hard drive system. Ran into some Linux trouble and did a test installing MiniMe2010.12 dual boot and also a LiveHDD install.

At some stage GRUB decided to throw an error 21 at me, eventually found out that root was pointing to the wrong place, I did a new GRUB install from LiveCD and the sytem is almost right. I have the following simple menu.lst

Quote
timeout 10
color black/cyan yellow/cyan
gfxmenu (hd0,5)/boot/gfxmenu
default 0

title MiniMe2010.12 (/dev/sda6)
kernel (hd0,5)/boot/vmlinuz BOOT_IMAGE=MiniMe2010.12_(/dev/sda6) root=UUID=b24f25c7-5602-4a4b-9c2c-5c5c08371f8c  resume=UUID=7c31a1a2-2f4c-42e1-bccf-52012e0a600c splash=silent vga=788
initrd (hd0,5)/boot/initrd.img

title linux-nonfb
kernel (hd0,5)/boot/vmlinuz BOOT_IMAGE=linux-nonfb root=UUID=b24f25c7-5602-4a4b-9c2c-5c5c08371f8c  resume=UUID=7c31a1a2-2f4c-42e1-bccf-52012e0a600c
initrd (hd0,5)/boot/initrd.img


title failsafe
kernel (hd0,5)/boot/vmlinuz BOOT_IMAGE=failsafe root=UUID=b24f25c7-5602-4a4b-9c2c-5c5c08371f8c  failsafe
initrd (hd0,5)/boot/initrd.img

title Windows XP Wedgetail
root (hd0,0)
makeactive
chainloader +1

title   MiniMeDown_(hd0,7)
kernel (hd0,7)/MiniMeDown_(hd0,7)/vmlinuz livecd=/MiniMeDown_(hd0,7)/MiniMeDown_(hd0,7) fromusb root=UUID=67ed901a-d7b5-41be-b1d3-333b22e03c2d acpi=on vga=791 splash=verbose
initrd (hd0,7)/MiniMeDown_(hd0,7)/initrd.gz

When I boot the system I see the titles above but for the red section, it is not an option.

If I try to select Windows the menu.lst with a slight pause re-writes on the screen and will boot the top line due to the short timeout.

The windows section is the same as I have used in several other systems

The last item on the list boots fine, it is a LiveHDD install used in testing some weeks ago.

The system also seems to boot into (Safe Mode) though I rarely go there so I am not sure if booting to a low level text terminal is correct.

The MiniMe system may not be fully updated but it has been slightly customised with minor panel cofigs and adding Opera, one user so the paswords are my daily ones.

Any suggestions welcome, I have to take break, goes past my understanding at present  :)

Edit: Just started a major download/upgrade as I was using 'riken' in Japan and that seemed to indicate I was updated, changing to 'heenet' completely different story.  Need over 400MB installed, not really intenede on this machine but oh well.
« Last Edit: September 07, 2011, 06:33:00 AM by wedgetail »
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline Archie

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8583
  • Aurum nostrum non est aurum vulgi.
Re: GRUB and menu.lst having fun with me
« Reply #1 on: May 10, 2011, 10:56:04 PM »
Quote
If I try to select Windows the menu.lst with a slight pause re-writes on the screen and will boot the top line due to the short timeout.

Try and comment out the timeout line:

Code: [Select]
# timeout 10
Then you can have all the time to use your arrow keys. A guru will come along soon after they've taken a good, close look at your boot stanzas.
Since 2006 | LiCo 401868 | Bare Metal | What is necessary is never unwise. --Sarek, 2258.42


Online wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2430
  • Any Bugs in site?
Re: GRUB and menu.lst having fun with me
« Reply #2 on: May 11, 2011, 01:06:51 AM »
Well I set the update going and went for the walk, seems all done when I arrived back and of course I forgot to save my custom settings. I will have to fire up the customised LiveCD this will have enough custom stuff for this system.

Made no difference to the boot perforamnce, I will get more details into the thread.

Archie
Thank you, I had left the 10 secs because they were not a problem, I just tap down one line and the 10 sec timeout is disabled.
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: GRUB and menu.lst having fun with me
« Reply #3 on: May 11, 2011, 03:27:29 AM »
Quote
When I boot the system I see the titles above but for the red section, it is not an option.

Grub will not display boot stanzas with a dash ( - ) in the title .....

Quote
title linux-nonfb


Quote
title MiniMe2010.12 (/dev/sda6)
kernel (hd0,5)/boot/vmlinuz BOOT_IMAGE=MiniMe2010.12_(/dev/sda6) root=UUID=b24f25c7-5602-4a4b-9c2c-5c5c08371f8c  resume=UUID=7c31a1a2-2f4c-42e1-bccf-52012e0a600c splash=silent vga=788
initrd (hd0,5)/boot/initrd.img

The highlighted part above may cause problems.
« Last Edit: May 11, 2011, 03:32:49 AM by Just19 »

Online wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2430
  • Any Bugs in site?
Re: GRUB and menu.lst having fun with me
« Reply #4 on: May 11, 2011, 04:20:17 AM »
Just19
Ah, about the - I am not sure but I think I may have subconsciously noted this odd behavior without taking any notice until today when something was 'wrong'. Let it rest in peace, the behavior is so strange that I have deleted all the Linux partitions on that pc.

I am in the process of re-installing my custom made MiniMe that has been through a lot lately  ;D I am not so sure it was the best of ideas as I like to pre-format all new partitions from root terminal, then prevent draklive-install from 'over-formatting' again, but I don't think it worked as it still went ahead and did a format, peeves me a bit.

Regarding the BOOT_IMAGE=MiniMe2010.12_(/dev/sda6) no that addition I believe is quite safe, it is linux that crated the variable.  I have figured this variable is the 'proper' Linux evaluation of the title, so because I had a space in the title line it was corrected to have the 'customary' underscore.  Don't know how wild that guess is but seems to follow some logic. ;D

By the way I needed the Windows on the other PC as I have trouble wit yet another PC I was using to convert tape to Video DVD, that PC is giving me hard time spitting out Video DVD's that I know works and it will not connect reliably the program DVDMaker2 program.

addition:
I just looked, I don't believe it  >:(  Linux installed but GRUB did not pick up there is 3 ntfs partitions (sda1, sda2 and sda3) so I manually added sda1 as 'Windows stanza' this just kicked me into GRUB when starting but the MiniMe custom runs fine. Back to the grind stone.

I am getting supersticious, I had the 'funny' hard drive installed for check here (this is the drive that prevents me form installing a full version from a LiveCD).

Edit;

Quote
[root@localhost gert]# mount
/dev/sda5 on / type ext4 (rw,commit=0)
none on /proc type proc (rw)
none on /dev/pts type devpts (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)


[root@localhost gert]# cat /boot/grub/menu.lst
timeout 10
color black/cyan yellow/cyan
gfxmenu (hd0,4)/boot/gfxmenu
default 0

title linux
kernel (hd0,4)/boot/vmlinuz BOOT_IMAGE=linux root=UUID=25fb8bd5-08f9-4609-ab11-533377475f7f  splash=silent vga=788
initrd (hd0,4)/boot/initrd.img

title linux-nonfb
kernel (hd0,4)/boot/vmlinuz BOOT_IMAGE=linux-nonfb root=UUID=25fb8bd5-08f9-4609-ab11-533377475f7f
initrd (hd0,4)/boot/initrd.img

title failsafe
kernel (hd0,4)/boot/vmlinuz BOOT_IMAGE=failsafe root=UUID=25fb8bd5-08f9-4609-ab11-533377475f7f  failsafe
initrd (hd0,4)/boot/initrd.img

title Windows XP
root (hd0,0)
chainloader +1
[root@localhost gert]#

I used the mount command just to be 110% sure that I know where to go looking for the menu.lst, which looks pretty innocuous ???
« Last Edit: May 11, 2011, 04:44:12 AM by wedgetail »
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: GRUB and menu.lst having fun with me
« Reply #5 on: May 11, 2011, 04:50:31 AM »
If you have a drive that 'might' be odd, then you are best to put it aside for full and complete wiping and reconstruction .....  maybe using the manufacturers app for the purpose .....  or if not then 'dd' might be sufficient.

Either way I would not think it is suitable in a machine you wish to use daily, until it has been thoroughly tested.

Online wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2430
  • Any Bugs in site?
Re: GRUB and menu.lst having fun with me
« Reply #6 on: May 11, 2011, 04:59:59 AM »
Just19
You are quite right, but it has a massive amount of data, I break out in a sweat thinking about what I have to go through.  However eventually I think this is the solution. For example if that drive is plugged in I can not save an html file from Opera to the USB stick, but if the drive is out no problems.

Anyway I will have to see how long I can survive with it as it is.  One great thing the re-mastering I now can work if not perfectly good enough to take backups before making big changes.  I save the ISO and only if something goes wrong will I drag it out and make LiveHDD install and fish out the details I want, no CD burning.  ;D
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: GRUB and menu.lst having fun with me
« Reply #7 on: May 11, 2011, 05:06:50 AM »
Get all the needed data on to something else quick .......

Online wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2430
  • Any Bugs in site?
Re: GRUB and menu.lst having fun with me
« Reply #8 on: May 11, 2011, 06:54:50 AM »
The new situation: GRUB is still not picking up the Windows XP session.

Code: [Select]
[root@localhost gert]# fdisk -l

Disk /dev/sda: 500.1 GB, 500106780160 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976771055 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x2411d025

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63    30732344    15366141    7  HPFS/NTFS
/dev/sda2        30732345    92164904    30716280    7  HPFS/NTFS
/dev/sda3        92164905   348160679   127997887+   7  HPFS/NTFS
/dev/sda4       348160680   976768064   314303692+   f  W95 Ext'd (LBA)
/dev/sda5       348162728   373328551    12582912   83  Linux
[root@localhost gert]#

Code: [Select]
[root@localhost gert]# blkid
/dev/sda2: LABEL="Data-1" UUID="723C5A153C59D4A7" TYPE="ntfs"
/dev/sda3: LABEL="Data-2" UUID="C0C86D53C86D48AC" TYPE="ntfs"
/dev/sda5: LABEL="GAMMA-05" UUID="25fb8bd5-08f9-4609-ab11-533377475f7f" TYPE="ext4"
[root@localhost gert]#

Code: [Select]
                                                        cfdisk (util-linux-ng 2.18)

                                                             Disk Drive: /dev/sda
                                                      Size: 500106780160 bytes, 500.1 GB
                                            Heads: 255   Sectors per Track: 63   Cylinders: 60801

       Name                 Flags               Part Type          FS Type                      [Label]                   Size (MB)
 --------------------------------------------------------------------------------------------------------------------------------------------
       sda1                 Boot                 Primary           HPFS/NTFS                                               15734.97          
       sda2                                      Primary           ntfs                         [Data-1]                   31453.48
       sda3                                      Primary           ntfs                         [Data-2]                  131069.84
       sda5                 NC                   Logical           ext4                         [GAMMA-05]                 12885.96          *
                                                 Logical           Free Space                                             308961.04          *

Code: [Select]
[root@localhost gert]# cat /boot/grub/menu.lst
timeout 1000
color black/cyan yellow/cyan
gfxmenu (hd0,4)/boot/gfxmenu
default 0

title linux
kernel (hd0,4)/boot/vmlinuz BOOT_IMAGE=linux root=LABEL=GAMMA-05 splash=silent vga=788
initrd (hd0,4)/boot/initrd.img

title linux_nonfb
kernel (hd0,4)/boot/vmlinuz BOOT_IMAGE=linux-nonfb root=LABEL=GAMMA-05
initrd (hd0,4)/boot/initrd.img

title failsafe
kernel (hd0,4)/boot/vmlinuz BOOT_IMAGE=failsafe root=LABEL=GAMMA-05 failsafe
initrd (hd0,4)/boot/initrd.img

title Windows XP
root (hd0,0)
makeactive
chainloader +1
[root@localhost gert]#

I just noticed that Konqueror user, does not see the first partition, sda1 when I am running the MiniMe, but does see the two ntfs, sda2 and sda3.

Code: [Select]
[root@localhost gert]# df
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda5              12G  1.8G  9.5G  16% /
/dev/sda2              30G  1.5G   28G   5% /media/Data-1
/dev/sda3             123G  7.1G  115G   6% /media/Data-2
[root@localhost gert]#

When I select the Windows title from boot menu, I am presented with > Grub
I can do the basic things, check for stage2, point root to the correct partition, setup grub on the drive.

I have typed in the windows menu lines by hand and then BOOT which sends me back to GRUB

 Just19
Getting SATA cables and preparing for big rsync -av session as well as big clean out, grinding my teeth I will let go of a lot of backups and experimental systems I thought I might come back to, in reality not likely.
« Last Edit: May 11, 2011, 07:14:20 AM by wedgetail »
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Online TerryN

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 723
Re: GRUB and menu.lst having fun with me
« Reply #9 on: May 11, 2011, 07:43:30 AM »
Is it possible that, at some point, you wrote grub to /dev/sda1 overwriting windows bootloader with grub ?
Dell E521 - AMD 64 X2 5000+, 4GB RAM, ATI X1300 graphics
PCLinuxOS 2013 (KDE)
|Twitter|

Online wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2430
  • Any Bugs in site?
Re: GRUB and menu.lst having fun with me
« Reply #10 on: May 11, 2011, 08:13:19 AM »
TerryN
Thanks for posting the suggestion. I really don't know, my first reaction would be no but I am thinking it looks like that too. I am updating my MiniMe right now so the machine is not available.

I am trying to remember where the first partition boot record start, I could then try and read it out with dd. I think I roughly know what it looks like.
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Online wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2430
  • Any Bugs in site?
Re: GRUB and menu.lst having fun with me
« Reply #11 on: May 11, 2011, 09:54:40 AM »
Well when the going gets tough a bit of manual grub work, this is what my Windows boot stanza does:

Code: [Select]
    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename. ]

grub>

Code: [Select]
grub> rootnoverify (hd0,0)
grub> makeactive
grub> chainloader +1
grub> boot
Loading stage2
grub>

Now   :'( :'( :'(
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Online wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2430
  • Any Bugs in site?
Re: GRUB and menu.lst having fun with me
« Reply #12 on: May 11, 2011, 10:57:18 AM »
Well I am not sure what has happened apart from at some stage I have managed do delete/loose every scrap on /dev/sda1.  I would love to have had time to investigate further, but I don't understand how this would have happened.  It was the last thing I expected.

I am intrigued that I seem to have an empty formatted ntfs partition but it does not show up in the df command, only the two ntfs data partitions. Are there anybody who can enlighten me  :-[

I had a Ghost backup, took all of 90 seconds to re-install approx 2GB of system.  The only thing I need is to find a driver for the installed Wireless card.

Ah, yes the windows stanza booted fine when the partition was 're-filled'
« Last Edit: May 11, 2011, 10:59:16 AM by wedgetail »
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: GRUB and menu.lst having fun with me
« Reply #13 on: May 11, 2011, 11:50:16 AM »
Quote
it does not show up in the df command

df  only shows mounted partitions ....  if it is not, or cannot be mounted, then it will not show in   df  ;)

Online wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2430
  • Any Bugs in site?
Re: GRUB and menu.lst having fun with me
« Reply #14 on: May 11, 2011, 08:17:42 PM »
Just19
Thanks.  I have just got the wireless card installed and running. I will install some more software and then make a Ghost Backup.

I will leave the problem for the time being, getting very far behind with work.
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen