OK, I got a kernel update and it trashed the boot loader leaving in a grub prompt. SO, since the system repair option was removed because "about the only thing it was used for was to fix the boot loader", how do I fix it? I really don't want to re-install. Bruce Ferrell -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 10/21/2010 08:59 PM, Bruce Ferrell wrote:
OK, I got a kernel update and it trashed the boot loader leaving in a grub prompt.
SO, since the system repair option was removed because "about the only thing it was used for was to fix the boot loader", how do I fix it? I really don't want to re-install.
Bruce Ferrell
You should be able to use the installation medium (CD/DVD) and boot the hard disk from there, correct the issue, then reboot back into the working system -Matt -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 10/21/2010 06:08 PM, Matt Hayes wrote:
On 10/21/2010 08:59 PM, Bruce Ferrell wrote:
OK, I got a kernel update and it trashed the boot loader leaving in a grub prompt.
SO, since the system repair option was removed because "about the only thing it was used for was to fix the boot loader", how do I fix it? I really don't want to re-install.
Bruce Ferrell
You should be able to use the installation medium (CD/DVD) and boot the hard disk from there, correct the issue, then reboot back into the working system
-Matt
Matt, I can bring it up to repair and mount the disks. I'm just not sure what to do from there. What exactly "correct the issue" mean? Bruce -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 10/21/2010 09:17 PM, Bruce Ferrell wrote:
On 10/21/2010 06:08 PM, Matt Hayes wrote:
On 10/21/2010 08:59 PM, Bruce Ferrell wrote:
OK, I got a kernel update and it trashed the boot loader leaving in a grub prompt.
SO, since the system repair option was removed because "about the only thing it was used for was to fix the boot loader", how do I fix it? I really don't want to re-install.
Bruce Ferrell
You should be able to use the installation medium (CD/DVD) and boot the hard disk from there, correct the issue, then reboot back into the working system
-Matt
Matt,
I can bring it up to repair and mount the disks. I'm just not sure what to do from there. What exactly "correct the issue" mean?
Bruce
What exactly is it doing when you boot up to the grub prompt? -Matt -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday, 2010-10-21 at 18:17 -0700, Bruce Ferrell wrote:
I can bring it up to repair and mount the disks. I'm just not sure what to do from there. What exactly "correct the issue" mean?
Well, you can have a look at the /boot/grub/menu.lst (of your system, not the dvd), and check the kernel line for errors. If you don't know what to look for, post the file here or into a pastebin. - -- Cheers, Carlos E. R. (from 11.2 x86_64 "Emerald" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (GNU/Linux) iEYEARECAAYFAkzA6pkACgkQtTMYHG2NR9UtnACePzjyddfOsmMizShcdZ1ESjLr wKQAn1FYTqY5MEEJjoYPBNLOP/HFISID =alSa -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2010/10/21 17:59 (GMT-0700) Bruce Ferrell composed:
OK, I got a kernel update and it trashed the boot loader leaving in a grub prompt.
SO, since the system repair option was removed because "about the only thing it was used for was to fix the boot loader", how do I fix it? I really don't want to re-install.
The grub menu is just a multiple choice script from which Grub executes commands according to your selection. You can boot from the Grub prompt, not just install or update Grub. http://orgs.man.ac.uk/documentation/grub/grub_4.html#SEC14 Once booted, compare /boot/grub/menu.lst with /boot/grub/menu.lst.old and see what the upgrade screwed up, and fix with your favorite text editor. If you can't tell yourself, share with the list a diff -u of the two files, and the output of fdisk -l. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 10/21/2010 06:31 PM, Felix Miata wrote:
On 2010/10/21 17:59 (GMT-0700) Bruce Ferrell composed:
OK, I got a kernel update and it trashed the boot loader leaving in a grub prompt.
SO, since the system repair option was removed because "about the only thing it was used for was to fix the boot loader", how do I fix it? I really don't want to re-install.
The grub menu is just a multiple choice script from which Grub executes commands according to your selection. You can boot from the Grub prompt, not just install or update Grub.
http://orgs.man.ac.uk/documentation/grub/grub_4.html#SEC14
Once booted, compare /boot/grub/menu.lst with /boot/grub/menu.lst.old and see what the upgrade screwed up, and fix with your favorite text editor. If you can't tell yourself, share with the list a diff -u of the two files, and the output of fdisk -l.
Ahhhh... Helpful. Thanks for passing me some clues. I started my linux career with Lilo... much simpler -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 10/21/2010 09:00 PM, Bruce Ferrell wrote:
I started my linux career with Lilo... much simpler
Yes, but make friends with grub and there is no end to the flexibility it offers -- or the confusion it can cause :p -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 10/21/2010 07:59 PM, Bruce Ferrell wrote:
OK, I got a kernel update and it trashed the boot loader leaving in a grub prompt.
SO, since the system repair option was removed because "about the only thing it was used for was to fix the boot loader", how do I fix it? I really don't want to re-install.
Bruce Ferrell
+++++++++++++++ Normal Install +++++++++++++++ (1) Boot with the install cd and get to a command line (repair console/whatever) (2) chroot your system "in say" /mnt use 'cat /proc/partitions' to list your partitions, then start with your root partition, home partition and then /boot (if separate and any others). Example: (assuming / is on /dev/sda1, /boot on /dev/sda2 and /home on /dev/sda3) mount /dev/sda1 /mnt mount /dev/sda2 /mnt/boot mount /dev/sda3 /mnt/home mount -o bind /dev /mnt/dev mount -o bind /proc /mnt/proc mount -o bind /sys /mnt/sys cd /mnt chroot /mnt ** now you have your system chrooted under /mnt and can use any tools (Yast/etc.) to reinstall grub. Just do it by hand, it's easier: (3) type 'grub' (no quotes) If you are not sure which partition actually holds stage1 boot, use the command 'find' like this: (4) grub> find /boot/grub/stage1 ( or just 'find stage1' ) This will search for the file name '/boot/grub/stage1' and show the devices which contain the file. Next set the root device correctly followed by the command 'setup' to complete the process. To set grub's root: (5) grub> root (hd0,0) where hd0 represents the drive (hd0 - first drive, hd1 - second drive, etc..) The next number is grub's root partition (not the same as your linux partition). This is the partition you BOOT from. So, if you have a separate /boot partition, this is the '0' based partition number for your /boot partition. If you have NO separate /boot partition, then this will just be your / partition number. If you have a RAID setup, then define the array that will serve as 'hd0', 'hd1' in your device.map file. Example: 00:21 archangel:~> cat /boot/grub/device.map (hd0) /dev/mapper/nvidia_fdaacfde (hd1) /dev/mapper/nvidia_baaccaja (fd0) /dev/fd0 Then, run the command 'setup' (6) grub> setup (hd0) Your output should be: Checking if "/boot/grub/stage1" exists....... no Checking if "/grub/stage1" exists....... yes Checking if "/grub/stage2" exists....... yes Checking if "/grub/e2fs_stage1_5" exists....... yes Running "embed /grub/e2fs_stage1_5 (hd0)"....... 15 sectors are embedded succeded Running "install /grub/stage1 (hd0) (hd0) 1+15 p (hd0,2)/grub/stage2 /grub/grub.conf....... succeded Done The setup command has installed the GRUB boot loader on the Master Boot Record (MBR) of the first drive. (or drive specified with (hd#)) (7) Type quit grub> quit GRUB is now in the MBR. (8) go check your kernel line in the /boot/grub/menu.lst file and make sure the initrd and vmlinuz files are linked to the proper files in /boot. If you need to re-link them, just use 'ln -sf <target> <link>' Like: ln -sf vmlinuz-2.6.25.20-0.7-default vmlinuz ln -sf initrd-2.6.25.20-0.7-default initrd (9) exit the chroot setup by typing 'exit' reboot :p -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 10/21/2010 08:00 PM, David C. Rankin wrote:
On 10/21/2010 07:59 PM, Bruce Ferrell wrote:
OK, I got a kernel update and it trashed the boot loader leaving in a grub prompt.
SO, since the system repair option was removed because "about the only thing it was used for was to fix the boot loader", how do I fix it? I really don't want to re-install.
Bruce Ferrell
+++++++++++++++ Normal Install +++++++++++++++
(1) Boot with the install cd and get to a command line (repair console/whatever) (2) chroot your system "in say" /mnt
use 'cat /proc/partitions' to list your partitions, then start with your root partition, home partition and then /boot (if separate and any others). Example:
(assuming / is on /dev/sda1, /boot on /dev/sda2 and /home on /dev/sda3)
mount /dev/sda1 /mnt mount /dev/sda2 /mnt/boot mount /dev/sda3 /mnt/home mount -o bind /dev /mnt/dev mount -o bind /proc /mnt/proc mount -o bind /sys /mnt/sys cd /mnt chroot /mnt
** now you have your system chrooted under /mnt and can use any tools (Yast/etc.) to reinstall grub. Just do it by hand, it's easier:
(3) type 'grub' (no quotes)
If you are not sure which partition actually holds stage1 boot, use the command 'find' like this:
(4) grub> find /boot/grub/stage1 ( or just 'find stage1' )
This will search for the file name '/boot/grub/stage1' and show the devices which contain the file. Next set the root device correctly followed by the command 'setup' to complete the process. To set grub's root:
(5) grub> root (hd0,0)
where hd0 represents the drive (hd0 - first drive, hd1 - second drive, etc..)
The next number is grub's root partition (not the same as your linux partition). This is the partition you BOOT from. So, if you have a separate /boot partition, this is the '0' based partition number for your /boot partition. If you have NO separate /boot partition, then this will just be your / partition number.
If you have a RAID setup, then define the array that will serve as 'hd0', 'hd1' in your device.map file. Example:
00:21 archangel:~> cat /boot/grub/device.map (hd0) /dev/mapper/nvidia_fdaacfde (hd1) /dev/mapper/nvidia_baaccaja (fd0) /dev/fd0
Then, run the command 'setup'
(6) grub> setup (hd0)
Your output should be:
Checking if "/boot/grub/stage1" exists....... no Checking if "/grub/stage1" exists....... yes Checking if "/grub/stage2" exists....... yes Checking if "/grub/e2fs_stage1_5" exists....... yes Running "embed /grub/e2fs_stage1_5 (hd0)"....... 15 sectors are embedded succeded Running "install /grub/stage1 (hd0) (hd0) 1+15 p (hd0,2)/grub/stage2 /grub/grub.conf....... succeded Done
The setup command has installed the GRUB boot loader on the Master Boot Record (MBR) of the first drive. (or drive specified with (hd#))
(7) Type quit
grub> quit
GRUB is now in the MBR.
(8) go check your kernel line in the /boot/grub/menu.lst file and make sure the initrd and vmlinuz files are linked to the proper files in /boot. If you need to re-link them, just use 'ln -sf <target> <link>' Like:
ln -sf vmlinuz-2.6.25.20-0.7-default vmlinuz ln -sf initrd-2.6.25.20-0.7-default initrd
(9) exit the chroot setup by typing 'exit'
reboot :p
Mr Rankin, I don't care what they say, you are a scholar and a gentleman! And I'll keep your secret! Thank you Bruce -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2010/10/22 21:04 (GMT-0700) Bruce Ferrell composed:
David C. Rankin wrote: ... (9) exit the chroot setup by typing 'exit' ... I don't care what they say, you are a scholar and a gentleman!...
9 steps can be a lot if you need to trust memory. Also you may not want your MBR corrupted by non-standard boot code if Grub is where it ought to be on the bootable partition. OTOH, booting is what Grub does. If your only initrd isn't the problem (you did set your kernel to multiversion in zypp.conf before updating, right?), then: grub> root (hd0,0) # or whatever partition holds your / grub> kernel /boot/vmlinuz root=/dev/sda1 noresume spla... # ditto grub> initrd /boot/initrd # or prior v. if the new one is a problem too grub> boot 4 steps, plus one more to locate it if you don't remember which partition holds your / -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 10/21/2010 11:46 PM, Felix Miata wrote:
9 steps can be a lot if you need to trust memory
That's why I never trust my memory -- I keep it in my 'basket' (basket notepads), under the folder 'Quickfix' :p -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (5)
-
Bruce Ferrell
-
Carlos E. R.
-
David C. Rankin
-
Felix Miata
-
Matt Hayes