Originally posted by ABvsPredator
View Post
Announcement
Collapse
No announcement yet.
Need to switch grub from one hard drive to another
Collapse
This topic is closed.
X
X
-
Windows no longer obstructs my view.
Using Kubuntu Linux since March 23, 2007.
"It is a capital mistake to theorize before one has data." - Sherlock Holmes
- Top
- Bottom
-
Well, grub is being finicky. Once we get it to boot from the SSD, you should be able to just update it and be good. Try these commands from the grub prompt
Code:recordfail insmod ext2 set root='(hd1,1)' linux /vmlinuz root=/dev/sdb1 initrd /initrd.img boot
sudo grub-install /dev/sdb
sudo update-grub
Use sda if the SSD is now sda...
- Top
- Bottom
Comment
-
The grub shell says recordfail isn't a command. The rest of the commands were accepted and it then booted into a shell, where it says sudo isn't a command. I didn't know what to do about that, so I just rebooted and did the workaround of booting into my HDD's grub to boot into the SSD and now I'm here.
- Top
- Bottom
Comment
-
If your BIOS can't "see" the HDD, that has nothing to do with GRUB. You said your SSD was taking over the boot process- sounds like you have a bad cable or your HDD is dying.
If you booted to a Grub USB, you can install grub to the SSD again but we've done that several times.
From the live USB you have to mount the root directory that contains /boot the you want to boot from, then run the grub-install --root-directory command as listed above. If this still doesn't work, you might have another issue like your PC (is it old?) might not allow booting from the SSD. I had an old Dell laptop that wouldn't.
- Top
- Bottom
Comment
-
Every time I boot up, no matter whether the BIOS saw the HDD or not, it still sees it once I'm on my SSD's Kubuntu install.... so what's up with that? Shouldn't that mean that the cable and HDD are okay if its still being recognized once I'm actually running the system? It was perfectly stable while being used, too. I feel like it would have started crashing during use if there was a problem with it.
I'm getting really tired of messing with this, so I have a question. Since my SSD's install is still pretty new and wouldn't take long to re-install the stuff I've installed, I've this question: would straight up formatting the SSD completely and re-installing Kubuntu fix the problem? I would unplug the HDD so there wouldn't be any confusion while re-installing Kubuntu.
- Top
- Bottom
Comment
-
Not sure this is the answer but you seem to be mixing up boot order and hard drive order in the bios with grub.
On occasion I seem to have to reset my raid disk as the first hard drive, then set it as the first boot option.
In my experience with dual linux systems, assuming grub is loaded on both:
If SSD is first in boot order and hard drive order, the grub on it should load and it will think that it is SDA.
If HDD is first in boot order and hard drive order, the grub on it should load and it will think that it is SDA.
The booted running OS usually thinks of itself as the SDA and the other installation as SDB, and when you boot into the other its the same.
So if the system is not adhering to the defined ordering...
Are you able to see both SSD and HDD is the bios post screen before the grub should show up?
If the bios is not retaining your preferences are you needing a battery replaced to keep the setting?
Is there a bios update for the motherboard?Kubuntu 18.04 on AMD
- Top
- Bottom
Comment
-
I've ordered some replacement sata and power cables for the HDD to see if that's the problem. I'll be backing it up soon, too.
Any reason why sudo grub-install and sudo update-grub haven't worked? The SSD is on drive SDB always, so I don't think its that it doesn't know where to install it.
My mobo doesn't appear to have a battery, I'm pretty sure it's updated to the most recent bios as well. Sometimes the HDD doesn't show up in the bios post screen, which is why I have those cables coming in the mail now.
Gparted recognizes the SSD as /dev/sdb. So does running sudo fdisk -l. I don't think it's installing grub to the wrong place when I run the grub-install and update-grub commands. I'm pretty sure I've always run it when I know that the SSD is /dev/sdb.
- Top
- Bottom
Comment
-
One last thing, does it matter that there's no asterisk under "boot" for /dev/sdb1? Or is that the problem?
Code:ab@ab:~$ sudo fdisk -l [sudo] password for ab: Disk /dev/sda: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x00070865 Device Boot Start End Blocks Id System /dev/sda1 * 2048 821223423 410610688 83 Linux /dev/sda2 821223424 843036671 10906624 83 Linux /dev/sda3 1936848894 1953523711 8337409 5 Extended Partition 3 does not start on physical sector boundary. /dev/sda4 1053274112 1468555263 207640576 7 HPFS/NTFS/exFAT /dev/sda5 1936848896 1953523711 8337408 82 Linux swap / Solaris Partition table entries are not in disk order Disk /dev/sdb: 250.1 GB, 250059350016 bytes 255 heads, 63 sectors/track, 30401 cylinders, total 488397168 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: 0x000b1051 Device Boot Start End Blocks Id System /dev/sdb1 2048 471719935 235858944 83 Linux /dev/sdb2 471721982 488396799 8337409 5 Extended /dev/sdb5 471721984 488396799 8337408 82 Linux swap / Solaris Disk /dev/sdc: 4016 MB, 4016045568 bytes 255 heads, 63 sectors/track, 488 cylinders, total 7843839 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: 0x00000000 Device Boot Start End Blocks Id System /dev/sdc1 * 38 7839719 3919841 b W95 FAT32
- Top
- Bottom
Comment
-
That is your misunderstanding I think... the asterisk is only marking which drive the system started from.
Assume with this that grub is installed on both drives.
For example, If you booted into Kubuntu 14.10... it would have the asterisk as the boot drive and it would call itself SDA and the 14.04 would be SDB.
Then if you booted Kubuntu 14.04 from a different hard drive... it would have the asterisk as the boot drive and it would call itself SDA and the 14.10 would be SDB.
Both systems consider themselves to be A depending on which is in boot control. The A or B designation is not passed back and forth or retained between the different Linux systems.Kubuntu 18.04 on AMD
- Top
- Bottom
Comment
-
Yes its confusing.
My suggestion is to only have the SSD in the system and setup grub to just work with it for now.
If you are having issues booting from it then you can narrow it down to a cable or bios issue or something of that sort.Kubuntu 18.04 on AMD
- Top
- Bottom
Comment
-
So here are my two ideas.
1) Leave only the SSD plugged in and boot from a kubuntu live usb and nuke the mbr on my ssd, then grub-install onto the ssd.
2) Nuke both hard drives (I have all documents backed up) and put Kubuntu on the SSD, leave the HDD as storage.
I know how to do the second one. But what about number 1? I'd rather try that first.
- Top
- Bottom
Comment
-
Actually I kind of want to try Elementary OS. If I just wipe the hard drives and install Elementary on the SSD, does anyone here think that'll "fix" the mbr in the installation process? Or is it possible that relics from other OS's previously installed will stay there and keep messing with things?
- Top
- Bottom
Comment
Comment