Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3474

[Testing - Trixie] [Solved] Re: LiveDebian USB flash for GRUB rescue

$
0
0
Hello community!
Sorry for long description!
Had to do:

Code:

boot: rescuegrub-install '(sda1)'
in attempt to restore GRUB of successfully installed Trixie using LiveDebian from USB flash.
Running 'Install...Rescue'from Installation Wizard brings dialog window

Code:

'!! Load installer components from installation media' with following content: 'No kernel modules were found. This probably is due to mismatch between the kernel used by this version of the installer and the kernel version available in the archive. You should make sure that your installation image is up-to-date, or - if that's the case - try try a different mirror, preferably deb.debian.org.The installation will probably fail to work if you continue without kernel modules.
There's no option to choose proper partition as two drives are misplaced by Installation Wizard itself. It states '/dev/sdaX' and '/dev/sdbY' . The fact is my positions are '/dev/sdaY' and '/dev/sdbX' - i.e. mirror flip over. Thus rescue fails to be initiated to missing partition.
Should it be installed without loading kernel modules?
Meanwhile using RescueLive I did:

Code:

root@debian:/home/user# /sbin/fdisk -lDisk /dev/sda: 238.47 GiB, 256060514304 bytes, 500118192 sectorsDisk model: SAMSUNG SSD PM85Units: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisklabel type: gptDisk identifier: 614E5657-54FD-494E-BA31-A0D10A332F8BDevice         Start       End   Sectors   Size Type/dev/sda1       2048   1026047   1024000   500M BIOS boot/dev/sda2    1026048   1107967     81920    40M unknown/dev/sda3    1107968   1370111    262144   128M Microsoft reserved/dev/sda4    1370112   2906111   1536000   750M Windows recovery environment/dev/sda5    2906112 245005083 242098972 115.4G Microsoft basic data/dev/sda6  245006336 246861823   1855488   906M Windows recovery environment/dev/sda7  246861824 451158015 204296192  97.4G Linux filesystem/dev/sda8  451158016 482316287  31158272  14.9G Linux filesystem/dev/sda9  482316288 500116143  17799856   8.5G Windows recovery environmentDisk /dev/sdb: 931.51 GiB, 1000204886016 bytes, 1953525168 sectorsDisk model: ST1000LM024 HN-MUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 4096 bytesI/O size (minimum/optimal): 4096 bytes / 4096 bytesDisklabel type: gptDisk identifier: 9FE9A6C6-64B0-4B78-B862-B6C0FE93E480Device          Start        End    Sectors   Size Type/dev/sdb1        2048     264191     262144   128M Microsoft reserved/dev/sdb2      264192 1042657279 1042393088 497.1G Microsoft basic data/dev/sdb3  1042657280 1953523711  910866432 434.3G Linux filesystemDisk /dev/sdc: 3.75 GiB, 4026531840 bytes, 7864320 sectorsDisk model: Flash Disk      Units: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisklabel type: dosDisk identifier: 0x923181b4Device     Boot Start     End Sectors  Size Id Type/dev/sdc1  *       64 7554623 7554560  3.6G  0 Empty/dev/sdc2        6628   13155    6528  3.2M ef EFI (FAT-12/16/32)Disk /dev/loop0: 2.92 GiB, 3137978368 bytes, 6128864 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytes
/dev/sdc is occupied by LiveDebian USB
So according to RescueLive my next step would be to mount partitions from SDD adn HDD to '/mnt' :

Code:

# mount /dev/sda7 /mnt       (Mounted the rootfs)# mount /dev/sda1 /mnt/boot/efi/        (Mounted the EFI boot partition)# mount /dev/sda8 /mnt/opt        (Separate partitions for /OPT during istall)# mount /dev/sdb3 /mnt/home       (Separate partitions for /HOME Just assume /mnt as new / for now and everything will be fall under /mnt/var, /mnt/tmp, /mnt/home like that)# for name in proc sys dev ; do mount --bind /$name /mnt/$name; done     (to bind mounts of /dev (device nodes), /proc (process information pseudo-file system), and /sys (kernel objects file system))# mount --bind /etc/resolv.conf /mnt/etc/resolv.conf      (For getting your network work inside chroot environment, just mount /etc/resolve.conf)# chroot /mnt/ /bin/bash     (To access/operate your locally installed system from live cd and make changes to it)#####   # nano /etc/default/grub  (GRUB_DISABLE_OS_PROBER=false     (To edit etc/default/grub (as root) after installation so this line reads 'false' which was already uncommented)# apt install network-manager-gnome      (To upgrade the grub and regenerate initramfs if necessary (most probably you don't have to))[code]         That last one gave normal output with one ERROR:...        Fetched 10.1 MB in 2s (6,545 kB/s)               Error: Can not write log (Is /dev/pts mounted?) - posix_openpt (19: No such device)...
Got a little stuck over here due to that ERROR.
But ignored it anyway.
After which I executed next command

Code:

# update-initramfs -uv; update-grub      (!!! Did not segregated 'update-grub' from rest of the the line and executed as is !!! That followed with massive shell output which could be seen here [url=https://pastebin.com/hcxKH81h]here[/url] ) 
Next command supposed to be

Code:

# exit
Which is not entered yet.
There's an ERROR: (grub-probe: error: cannot find a GRUB drive for /dev/sdc1. Check your device.map.) Here comes my USB with LiveDebian on it. I put it into archive for the reference.
I see that second OS is missing from update-grub output and keep machine idle without executing it in hope somebody will help me to get this second OS right in GRUB?
QUESTION:
Can I safely execute # exit ?

Statistics: Posted by nikobit — 2025-02-05 13:48 — Replies 6 — Views 145



Viewing all articles
Browse latest Browse all 3474

Trending Articles