Re: Grub issue
On Tue 29 Nov 2022 at 14:36:16 (+), Andrew Wood wrote: > On 28/11/2022 23:52, David wrote: > > > > Can you confirm that you are entering commands at the prompt that looks > > like: > > > >grub rescue> > > > > That identifies the GRUB rescue shell, which is different to the normal > > GRUB shell. I'm assuming that's true, though you haven't confirmed it. > > The first command that I would use is a bare 'set' with no arguments. > > > >grub rescue> set > > > > which will show GRUB's initial configuration that it uses when it first > > fails to read the disk. Can you show us that output? > > > > boot=(hd0,msdos2) > > cmdpath=(hd0) > > prefix=(hd0,msdos2)/boot/grub Have you tried setting prefix to the other disk, hd1, (or did you not install Grub on both?). > root=mduuid/2c411ef962... > > > Tab autocompletion doesnt seem to work > > ls gives (hd0) (hd0,msdos2) (hd0,msdos1) (hd1) (hd1,msdos2) > (hd1,msdos1) (md/1) (md/0) > > > ls (hd0,msdos2)/boot gives file not found but ls (md/1)/boot shows the > kernels and initrd images Is that all it lists? What about grub? (the directory). If that /is/ there, what's listed in it? Is it what you expect (which seems to be i386-pc). On Tue 29 Nov 2022 at 23:59:34 (+), Andrew Wood wrote: > Unfortunately insmod normal is still giving file not found > > ls (md/1)/boot/grub/i386-pc shows its not there. Sorry, but what does it show? Does it show a lot of other files, but not normal.mod? Or is it empty? Or is it the i386-pc directory itself that's not there? Remember, you're having to search around in the absence of completion, but out here, we can't see anything without it's being posted. If you fail to find normal.mod anywhere, then I would boot the system from a grub-rescue stick. The debian package is called grub-rescue-pc. Copy its .iso to a stick, then boot the stick to its Grub menu, press c (which gives you the /full/ Grub command set with completion), confirm the location of your kernel and initrd, then ESC out, and press e on the GNU/Linux entry (to edit grub.cfg's menuentry). Edit your desired values into the stanza that reads: # For booting GNU/Linux menuentry "GNU/Linux" --id gnulinux { set root=(hd0,msdos1) linux /vmlinuz root=/dev/sda1 initrd /initrd.img } and press F10 or Ctrl-X to boot the system using the modified menu. Then reinstall grub (the package), generate a new grub.cfg, and then install Grub into the MBR on both disks. Cheers, David.
Re: Grub issue
On Wed, 30 Nov 2022 at 11:00, Andrew Wood wrote: > On 29/11/2022 20:48, David wrote: > > On Wed, 30 Nov 2022 at 01:36, Andrew Wood wrote: > > Disclaimer: I have never done this with RAID, so using a GRUB > > device looking like (md/x) is unknown territory for me. > > > >> ls (md/1)/boot shows the kernels and initrd images > > Ok, based on that, if you still need help to boot the machine, > > then you could try: > > > >set prefix=(md/1)/boot/grub > >insmod normal > >normal > > # now see normal grub> prompt > > # maybe tab completion works now > > # maybe do 'set root=(md/1)' or some other value revealed by 'ls' > > # but I dont think 'set root' is useful at this time, maybe later > >boot > > > > If that doesn't get you into normal grub, you could try Tim's > > approach: > > > >set root=(md/1) > > # use 'ls /boot' to discover ...filenames under /boot (under that root) > >linux /boot/vmlinuz-... root=whatever usually is here, not grub's > > 'root' > >initrd /boot/initrd.img-... > >boot > > Thanks David &Tim > > Unfortunately insmod normal is still giving file not found > > ls (md/1)/boot/grub/i386-pc shows its not there. > > When I try to run linux /boot/vmlinuz... > > and initd /boot/initrd.img > > it says Unknown command 'linux' and Unknown command 'initrd' Yes, sorry. My memory was unreliable, that was bad advice. The 'linux' and 'initrd' and other commands will not be available until GRUB is running in normal mode, which will require 'insmod normal' and 'normal' commands to succeed. > > Also, before you try any of that, it would be interesting if you > > would tell us how GRUB responds if you try: > >grub rescue> ls (md/0)/boot > > "erorr: unknown filesystem" > > pretty sure that is the swap space. Yes, ok. That was a stupid question. As I mentioned at the top, I have no experience of doing this with RAID. I was thoughtlessly and incorrectly thinking that md/0 and md/1 might refer to the individual drives in the RAID, rather than the different partitions. I don't think I can be of any further help. Perhaps you can try to boot without RAID, or from an external filesystem.
Re: Grub issue
On Tue, Nov 29, 2022 at 7:00 PM Andrew Wood wrote: > ... > Thanks David &Tim > > Unfortunately insmod normal is still giving file not found > > ls (md/1)/boot/grub/i386-pc shows its not there. > > When I try to run linux /boot/vmlinuz... > > and initd /boot/initrd.img > > it says Unknown command 'linux' and Unknown command 'initrd' > > > Also, before you try any of that, it would be interesting if you > > would tell us how GRUB responds if you try: > >grub rescue> ls (md/0)/boot > > "erorr: unknown filesystem" > > pretty sure that is the swap space. Maybe it's time to break the RAID and try to boot from a single disk: https://duckduckgo.com/?q=linux+break+raid1+boot Jeff
Re: Grub issue
On 29/11/2022 20:48, David wrote: On Wed, 30 Nov 2022 at 01:36, Andrew Wood wrote: Disclaimer: I have never done this with RAID, so using a GRUB device looking like (md/x) is unknown territory for me. ls (md/1)/boot shows the kernels and initrd images Ok, based on that, if you still need help to boot the machine, then you could try: set prefix=(md/1)/boot/grub insmod normal normal # now see normal grub> prompt # maybe tab completion works now # maybe do 'set root=(md/1)' or some other value revealed by 'ls' # but I dont think 'set root' is useful at this time, maybe later boot If that doesn't get you into normal grub, you could try Tim's approach: set root=(md/1) # use 'ls /boot' to discover ...filenames under /boot (under that root) linux /boot/vmlinuz-... root=whatever usually is here, not grub's 'root' initrd /boot/initrd.img-... boot Thanks David &Tim Unfortunately insmod normal is still giving file not found ls (md/1)/boot/grub/i386-pc shows its not there. When I try to run linux /boot/vmlinuz... and initd /boot/initrd.img it says Unknown command 'linux' and Unknown command 'initrd' Also, before you try any of that, it would be interesting if you would tell us how GRUB responds if you try: grub rescue> ls (md/0)/boot "erorr: unknown filesystem" pretty sure that is the swap space.
Re: Grub issue
On Wed, 30 Nov 2022 at 01:36, Andrew Wood wrote: Disclaimer: I have never done this with RAID, so using a GRUB device looking like (md/x) is unknown territory for me. > ls (md/1)/boot shows the kernels and initrd images Ok, based on that, if you still need help to boot the machine, then you could try: set prefix=(md/1)/boot/grub insmod normal normal # now see normal grub> prompt # maybe tab completion works now # maybe do 'set root=(md/1)' or some other value revealed by 'ls' # but I dont think 'set root' is useful at this time, maybe later boot If that doesn't get you into normal grub, you could try Tim's approach: set root=(md/1) # use 'ls /boot' to discover ...filenames under /boot (under that root) linux /boot/vmlinuz-... root=whatever usually is here, not grub's 'root' initrd /boot/initrd.img-... boot If you can get to the normal grub prompt these might be useful commands: set root= boot set pager=1 (so that help output does not scroll off screen) help cat FILE Also, before you try any of that, it would be interesting if you would tell us how GRUB responds if you try: grub rescue> ls (md/0)/boot
Re: Grub issue
On 28/11/2022 23:52, David wrote: Can you confirm that you are entering commands at the prompt that looks like: grub rescue> That identifies the GRUB rescue shell, which is different to the normal GRUB shell. The first command that I would use is a bare 'set' with no arguments. grub rescue> set which will show GRUB's initial configuration that it uses when it first fails to read the disk. Can you show us that output? boot=(hd0,msdos2) cmdpath=(hd0) prefix=(hd0,msdos2)/boot/grub root=mduuid/2c411ef962... Tab autocompletion doesnt seem to work ls gives (hd0) (hd0,msdos2) (hd0,msdos1) (hd1) (hd1,msdos2) (hd1,msdos1) (md/1) (md/0) ls (hd0,msdos2)/boot gives file not found but ls (md/1)/boot shows the kernels and initrd images Thanks
Re: Grub issue
On Tue, 29 Nov 2022 at 05:12, Andrew Wood wrote: > Hi Can someone help me with a Grub problem please. > > I have 2 disks in a RAID1 mirrror with 2 partitions. sda1 & sdb1 = md0 > swap parition and sda2 & sdb2 = md1 root parition. The disks are MBR > style partitiions. > > For some reason Grub has got corrupted on both and it wont boot. > > Ive tried running the following at the grub prompt > > ls (hd0,msdos2) > > which says file system is ext2 > > set boot=(hd0,msdos2) > > set prefix=(hd0,msdos2)/boot/grub > > insmod normal > > error: file /boot/grub/i386-pc/normal.mod not found > > Can anyone please help me restore the MBR to both disks? Hi, Restoring the MBR requires running 'grub-install', which needs a running system. You could try using some external rescue filesystem to boot. Alternatively, you can try booting its internal file system, as below. Can you confirm that you are entering commands at the prompt that looks like: grub rescue> That identifies the GRUB rescue shell, which is different to the normal GRUB shell. The first command that I would use is a bare 'set' with no arguments. grub rescue> set which will show GRUB's initial configuration that it uses when it first fails to read the disk. Can you show us that output? Do not use any other 'set' commands before trying the following. The GRUB rescue shell supports tab completion, which can be used to interactively explore what GRUB is able to read off the disk at any time. For example, at the 'grub rescue>' prompt, you only need to type ls ( followed by a TAB, and GRUB will display the list of drives. You should be able to use tab completion 3 times (once for drive, partition, directory) to get to this: grub rescue> ls (hd0,msdos2)/boot/ What happens then when you press the TAB key? You should expect that GRUB offers '(hd0,msdos2)/boot/grub' before you try to use that string to 'set' the 'prefix' value. This method can be used to explore what GRUB is able to see inside the file systems that are available to it. 'prefix' value is what you would have to 'set' correctly so that the 'insmod normal' command will work, which is what you would need to progress you out of the GRUB rescue shell and into the normal GRUB shell. If you can't do that, the GRUB rescue shell also accepts 'linux', 'initrd', and 'boot' commands. You can also use TAB completion to assist with getting those correct and be sure that GRUB can find any file paths you specify. You will also need to specify whatever other kernel commandline parameters are needed. 'root' value is just to save typing. It just specifies what a leading '/' means in any file path that does not begin with a device. I expect that this method can also be used to explore the second disk in your RAID. Use 'hd1' instead of 'hd0'. I wrote this from memory and some personal notes, I hope it helps.
Re: Grub issue
On Mon, 28 Nov 2022, Andrew Wood wrote: Hi Can someone help me with a Grub problem please. I have 2 disks in a RAID1 mirrror with 2 partitions. sda1 & sdb1 = md0 swap parition and sda2 & sdb2 = md1 root parition. The disks are MBR style partitiions. For some reason Grub has got corrupted on both and it wont boot. Ive tried running the following at the grub prompt ls (hd0,msdos2) which says file system is ext2 set boot=(hd0,msdos2) set prefix=(hd0,msdos2)/boot/grub insmod normal error: file /boot/grub/i386-pc/normal.mod not found Can anyone please help me restore the MBR to both disks? can you boot and not worry about the grub menu for now? Something like: (sorry, I do this so rarely that I can only give approximate commands. grub should have filename completion to help) root=(hd0,msdos2) linux /boot/vmlinuz-4.19.0-22-686-pae root=/dev/md1 initrd /boot/initrd.img-4.19.0-22-686-pae boot once it's booted you can then grub-install /dev/sda and sdb and hopefully fix things. (obviously use the right kernel/initrd that you have in /boot and not something I've copied randomly)
Grub issue
Hi Can someone help me with a Grub problem please. I have 2 disks in a RAID1 mirrror with 2 partitions. sda1 & sdb1 = md0 swap parition and sda2 & sdb2 = md1 root parition. The disks are MBR style partitiions. For some reason Grub has got corrupted on both and it wont boot. Ive tried running the following at the grub prompt ls (hd0,msdos2) which says file system is ext2 set boot=(hd0,msdos2) set prefix=(hd0,msdos2)/boot/grub insmod normal error: file /boot/grub/i386-pc/normal.mod not found Can anyone please help me restore the MBR to both disks? Thanks Andrew
Re: Simple dual boot - grub issue
On Ma, 22 iun 10, 00:56:53, Jason Filippou wrote: > > I had a look at my grub.cfg and didn't see a "menuentry" corresponding > to the windows partition, even after running update-grub. What are the > steps that I need to follow in order to dual boot my system? The only > OS I have currently access to through Grub is Debian (with the option > of two kernels, but that's not really relevant). Grub does not detect other OSes, the package os-prober does. Make sure it is installed and rerun update-grub. If it still won't detect your Windows you can try also writing a custom entry in the file /etc/grub.d/40_custom, but I bet the os-prober maintainer would want to know about it. Regards, Andrei -- Offtopic discussions among Debian users and developers: http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic signature.asc Description: Digital signature
Re: Simple dual boot - grub issue
On Monday 21 June 2010 23:56:53 Jason Filippou wrote: > Hello list, > > I have had a laptop wearing Linux solely over the last few years and > today I decided I'd install a Windows partition on it, with aim to > dual boot. After preparing an NTFS partition by using the gparted live > CD, I installed Windows 7 on the newly created partition. Thus, so far > I have the primary partitions /dev/sda1, an ext3 partition holding my > Squeeze installation, and /dev/sda2, holding my Windows installation. > There's also the /dev/sda3 "extended" partition and the /dev/sda5 > "swap" partition. Here's a gparted screenshot taken from within my > debian installation to prove my claims: > http://img199.imageshack.us/img199/1819/mypartitions.jpg > > When the installation was finished, I would only boot into Windows 7. > Somewhat accustomed to this loss of the Grub boot loader, I booted > from my Squeeze installation CD, entered Rescue Mode and reinstalled > GRUB in the MBR of my only hard drive (that corresponds to the > /dev/sda1 partition). However, even though I reclaimed Grub, Grub > would not detect my Windows partition on bootup, and give me the > options of boot into debian. I tried reinstalling GRUB on other > partitions, but Windows was (and still is) unbootable on startup. > > I had a look at my grub.cfg and didn't see a "menuentry" corresponding > to the windows partition, even after running update-grub. What are the > steps that I need to follow in order to dual boot my system? The only > OS I have currently access to through Grub is Debian (with the option > of two kernels, but that's not really relevant). > > Thanks. Try 'update-grub' as root Thierry -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/201006220054.29516.tchate...@free.fr
Simple dual boot - grub issue
Hello list, I have had a laptop wearing Linux solely over the last few years and today I decided I'd install a Windows partition on it, with aim to dual boot. After preparing an NTFS partition by using the gparted live CD, I installed Windows 7 on the newly created partition. Thus, so far I have the primary partitions /dev/sda1, an ext3 partition holding my Squeeze installation, and /dev/sda2, holding my Windows installation. There's also the /dev/sda3 "extended" partition and the /dev/sda5 "swap" partition. Here's a gparted screenshot taken from within my debian installation to prove my claims: http://img199.imageshack.us/img199/1819/mypartitions.jpg When the installation was finished, I would only boot into Windows 7. Somewhat accustomed to this loss of the Grub boot loader, I booted from my Squeeze installation CD, entered Rescue Mode and reinstalled GRUB in the MBR of my only hard drive (that corresponds to the /dev/sda1 partition). However, even though I reclaimed Grub, Grub would not detect my Windows partition on bootup, and give me the options of boot into debian. I tried reinstalling GRUB on other partitions, but Windows was (and still is) unbootable on startup. I had a look at my grub.cfg and didn't see a "menuentry" corresponding to the windows partition, even after running update-grub. What are the steps that I need to follow in order to dual boot my system? The only OS I have currently access to through Grub is Debian (with the option of two kernels, but that's not really relevant). Thanks. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/aanlktikrja8ialqovqvbyd4omfvnq5w-bvgtkuzuo...@mail.gmail.com