Yet another grub hiccough.
"It would be good to have a bootable backup disk," I thought. So as I was organizing one, I backed up my current install to be bootable. It's mainly the /home I need anyhow I added partuuids to the fstab, and mkade this grub config for the backup disk (to be booted via usb atm)
Code:
# Begin /boot/grub/grub.cfg Code:
root@RoseViolet:/boot/grub# grub-install /dev/sdb Now this is all my fault, of course. But what should have known that I didn't? |
You are attempting to install grub to a gpt drive in legacy mode.
try Code:
grub-install --force /dev/sdb |
|
Thanks Didier Spaier, & colorpurple21859.
To cut to the chase, grub thinks it's installed, but it doesn't see the disk as bootable when I press F10 on bootup. There's no gpt here, I got this box in early 2013,which was a very patchy time for UEFI support. I eventually hacked into an extremely hostile BIOS enough to get Legacy mode going, and never looked back. Just thinking, even formatting with gdisk is enough to reawaken UEFI. I did format the new disk with gdisk. But I haven't woken the enemy Bios thus far … Code:
bash-5.1$ sudo gdisk -l /dev/sdb I find it's always the last thing you think of trying with grub that works. In my case, it was making the Bios Boot partition. Grub installed error free, but the System Can't See It when I hit F10 and looks for an alternative boot source. SCSI indeed. Do I need to put a file system on that Bios Boot partition, and if so, which one? |
Quote:
Quote:
Code:
parted /dev/sdb disk_set pmbr_boot on |
Ok the parted command did nothing, not making things worse or better.
A little thought unciurled itself in my head here. I have a duplicate (backup) system here on /dev/sdb. So I can run the grub command installed on /dev/sda; Or I can do a chroot and run the grub command installed on /dev/sdb; Or, I can also install from a live usb key which leads to endless combinations. But what is the kosher grub to run? Does using the grub on sda mean that sda has to be referenced in the bootup process? The usual time you want an alternative is when you box won't boot. What I have been doing is the same as the live usb. I press F10 during bootup, to select an alternative boot device, and I don't see sdb there. I do see my rather blind sr0, but not my usb drive. |
You might enjoy rEFInd. It is human readable text with a LOT of syntax and usage comments in the config file and it doesn't care whether a disk is partitioned Legacy MBR or GPT or some are UEFI booted. The existing slackbuild at slackbuilds.org works whether you're on 14.2 or 15.0-RC2. It will find and try to boot any existing kernel it sees (unless you choose hide one or many) any elilo config, maybe more if you want to check. The documentation is very good.
|
Quote:
|
http://www.rodsbooks.com/refind/
It is an EFI boot manager. If you are not on an EFI/UEFI machine you do not need it. Nice project though. |
Well, I narrowed the options slightly.
I mounted sdb with all partitions correctly positioned, copied over the /dev/disk stuff, and did a chroot onto /dev/sdb. I mounted proc, checked /boot/grub/grub.cfg, and ran Code:
grub-install /dev/sdb Here's the bit of the 'iso2usb.sh' script, which looks an awful lot different from what I did. I already feel another 550G copy coming on :mad: Code:
# Use sgdisk to wipe and then setup the USB device: Code:
# Setup the disk partitions: I'd welcome ideas on this, but I'm backing off the priority a tad, as I have a cd/dvd rom --> 2.5" hd converter on it's way from our helpful friends at Ali Express, to make a slightly less chaotic setup here, and better use the unspectacular throughput this box posesses. |
Quote:
Quote:
|
Do you have grub installed in the mbr of sda and/or does sda boot with grub?
|
sda is mbr formatted, and sda1=/boot=ext4. I presume grub is in sda's mbr.
I feel another rejig of that new disk coming on, but who cares? I'm thinking all the /dev/disk/by-* symlinks probably broke when I copied them over. I might give that another go if I get energy. |
at sda grub boot menu press c for grub command line
Code:
grub>ls if it is make a /boot/grub/custom.cfg file on sda1 with this in Code:
menuentry 'sdb chainload' { |
My apologies if rEFInd doesn't help your case, business_kid. I may be projecting my own confusion with Grub on multi disk, multi partitioned systems. I had a terrible time just trying to use Grub CLI to try to discover exactly what it could "see" and then how to correctly handle the arcane syntax to properly boot them/it. rEFInd made it vastly simpler for me as I have 4 drives, 2 SSDs and 2 HDDs, with some partitioned GPT and others MBR. rEFInd made that relatively simple for me, simple enough I can see just EFI bootables if I disable CSM Legacy. or all of them if I enable CSM. It might not be what you need but it's a thought possibly worth looking into.
|
All times are GMT -5. The time now is 01:24 PM. |