Code: Select all
To bypass this run this with -r /dev/sdc1
Code: Select all
export moduleslist="loop:xhci-pci:ohci-pci:ehci-pci:xhci-hcd:uhci-hcd:ehci-hcd:mmc-core:mmc-block:sdhci:sdhci-pci:sdhci-acpi:usb-storage:hid:usbhid:i2c-hid:hid-generic:hid-apple:hid-asus:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:crc32c-intel:fuse"
sudo mkinitrd -c -f ext4 -u -w 10 -o /boot/initrd-5.10.4.gz -r /dev/sdc1 -k 5.10.4 -m $moduleslist
sudo rm -rf /boot/initrd-name
sudo update-grub
Examine /boot/grub/grub.cfg on usb and see if there is sdc, hd2, ahci2 If not run the follow commands. Or edit /boot/grub/grub.cfg and change sdb to sdc, hd1 to hd2 ahci1 to ahci2
sudo mkdir /mnt/install
mount your_usb to /mnt/install
su
Code: Select all
sed -i "s/sdb/sdc/g" /mnt/install/boot/grub/grub.cfg
sed -i "s/hd1/hd2/g" /mnt/install/boot/grub/grub.cfg
sed -i "s/ahci1/ahci2/g" /mnt/install/boot/grub/grub.cfg
to go back to boot to laptop
run the above command with -r /dev/sdb1
Of course users can have 3 disks and usb will be the fourth. I cannot cover all situations. I assume that usb is the second disk.