You are not logged in.

#1 2020-02-02 16:08:05

Pechvogel
Member
Registered: 2020-01-31
Posts: 2

[SOLVED] Arch-SSD doesn't boot in another machine (into Grub at all)

Hi everyone,

first of all, I'm quite new to Arch. I started to use it instead of windows a few months ago and didn't have much experience in Linux before at all.


A beer accident caused the mainboard of my Thinkpad T430s to crash. I put its SSD into another T430s (almost same hardware even). When booting using a bootable Linux-USB-stick, I can see, that all the data is still there. Also lenovo diagnostics tell me, the SSD passes all the tests.

Actually it should also be possible to boot into Grub/Arch on the SSD just like in the other laptop, right?

The broken laptop is configuered as an UEFI system. But anyway I tried all the combinations of all the settings possible in BIOS (secure-boot disabled... ....). Every time just this menu pops up where I can choose the drive I want to boot from. I can choose the SSD but nothing happenes then, this menu shows up again after a second of blank screen. Besides the SSD, USB-drive and DVD, "Windows boot manager" is also choosable in this menu. The working laptops original SSD contains Windows 10. Does it somehow expect to boot Windows and doesn't check, if there is Grub to find anywhere?


So, do you think, the SSD took any damage?

Do I have to install Arch again -or just Grub or is there a way I can make the machine just boot into the Grub which is already there?


Thank you so much!

Last edited by Pechvogel (2020-02-02 20:28:34)

Offline

#2 2020-02-02 16:28:48

cynicfm
Member
From: Home
Registered: 2019-05-31
Posts: 73

Re: [SOLVED] Arch-SSD doesn't boot in another machine (into Grub at all)

If there isn't grub already installed on the laptop then yes only grub needs to be installed and os-prober for multiple systems... Not necessary to reinstall arch again
BTW. Next time be careful to not place alcohol near laptop :-).

Well so try this
boot to usb live distribution and then press fdisk -l locate the root partition
so
/dev/sdX (like /dev/sda1 or /dev/sdb3) is arch root partition and it is possible to access it from usb live distribution using chroot command

mount /dev/sdX /mnt 
cd /mnt

Now when root partition is mounted and /mnt accessed from terminal

mount -t proc /proc proc/
mount --rbind /sys sys/
mount --rbind /run run/
mount --rbind /dev dev/
chroot /mnt /bin/bash

Then download and install grub if not already installed and os-prober assuming device is connected to internet

pacman -Sy grub os-prober
grub-install --recheck /dev/sdX (/dev/sda or /dev/sdb)

Now os-prober is package that will be able to detect multiple partitions on the SDD and create the proper grub.cfg file
So now

grub-mkconfig -o /boot/grub/grub.cfg

Now there should be linux kernel image listed and eventually Arch Linux on /dev/sdX and windows...

Now to quit chroot just type exit and reboot there should be grub with windows 10 and linux on the list...

Last edited by cynicfm (2020-02-02 16:30:46)


I am new to linux 24 years and vegetarian.

If i typed something wrong please correct me as i am learning.
Thank you.

Offline

#3 2020-02-02 20:24:56

Pechvogel
Member
Registered: 2020-01-31
Posts: 2

Re: [SOLVED] Arch-SSD doesn't boot in another machine (into Grub at all)

Thanks a lot for you efforts! I might have not explained well enough, that grub was already installed and worked well in the now broken device... sorry. It had to be something not related to the data on the SSD (if it was not broken)....


The missing link was this list of bootloaders in NVRAM, I didn't know about befor, where an entry for grub had to be added. In the end, it was a single command, that fixed the issue:

sudo efibootmgr --create --disk /dev/sda --part 1 --label "Precise - GRUB2" --loader \\EFI\\grub_arch\\grubx64.efi

Offline

Board footer

Powered by FluxBB