Jump to content

So I currently have a dual-boot setup. Each OS is installed on its own drive. However, if I remove the Windows SSD, then my Linux system won't boot. It just hangs with the Linux Mint logo after I select it from the dual-boot menu. Any ideas what might be going on? It's not a complete deal breaker to have my Windows SSD installed (it usually is anyway), but I'm worried about losing my Linux system if something happens to my Windows system.

System Specs: Second-class potato, slightly mouldy

Link to post
Share on other sites

13 minutes ago, YellowJersey said:

if I remove the Windows SSD, then my Linux system won't boot. It just hangs with the Linux Mint logo after I select it from the dual-boot menu.

Odd, my first thought is efi bootloader is shared with windows. But it cant be if  you are seeing the grub bootloader and and option to boot linux/windows without the windows drive connected.

 

To know why it hangs, linux has a text based boot process. To show the boot process need to modify grub config as suggested here

https://forums.linuxmint.com/viewtopic.php?t=347913

When booting mint, instead of a logo you'll now see a scrolling wall of text of the boot process. What line hangs on boot when the windows drive is removed?

Link to post
Share on other sites

2 hours ago, YellowJersey said:

So I currently have a dual-boot setup. Each OS is installed on its own drive. However, if I remove the Windows SSD, then my Linux system won't boot. It just hangs with the Linux Mint logo after I select it from the dual-boot menu. Any ideas what might be going on? It's not a complete deal breaker to have my Windows SSD installed (it usually is anyway), but I'm worried about losing my Linux system if something happens to my Windows system.

I think your fstab contains the Windows disk and it can't find it and freaks out. Check out the /etc/fstab file.

Asus Zephurs Duo 2023:

 

CPU: 7945HX

GPU: 4090M

OS: BazziteOS

Link to post
Share on other sites

16 hours ago, C2dan88 said:

Odd, my first thought is efi bootloader is shared with windows. But it cant be if  you are seeing the grub bootloader and and option to boot linux/windows without the windows drive connected.

 

To know why it hangs, linux has a text based boot process. To show the boot process need to modify grub config as suggested here

https://forums.linuxmint.com/viewtopic.php?t=347913

When booting mint, instead of a logo you'll now see a scrolling wall of text of the boot process. What line hangs on boot when the windows drive is removed?

 

 I'll check it out and report back.

15 hours ago, CosmicEmotion said:

I think your fstab contains the Windows disk and it can't find it and freaks out. Check out the /etc/fstab file.

I'll check it out and report back. Had a busy day today.

System Specs: Second-class potato, slightly mouldy

Link to post
Share on other sites

16 hours ago, CosmicEmotion said:

I think your fstab contains the Windows disk and it can't find it and freaks out. Check out the /etc/fstab file.

Ok, I input "editor /etc/fstab" into the terminal and it gave me this. I think you're right, because sda2 is my Linux drive whereas I'm pretty sure nvme0n1p1 is my Windows drive. How would I remove my Windows drive from fstab? Is that even what I need to do? (I figure it's worth asking rather than blindly messing around and risk buggering the whole thing up!" Screenshotat2024-09-2219-44-15.thumb.png.d267043f13aedf37c0028614e381ff7e.png

System Specs: Second-class potato, slightly mouldy

Link to post
Share on other sites

2 hours ago, YellowJersey said:

Ok, I input "editor /etc/fstab" into the terminal and it gave me this. I think you're right, because sda2 is my Linux drive whereas I'm pretty sure nvme0n1p1 is my Windows drive. How would I remove my Windows drive from fstab? Is that even what I need to do? (I figure it's worth asking rather than blindly messing around and risk buggering the whole thing up!" Screenshotat2024-09-2219-44-15.thumb.png.d267043f13aedf37c0028614e381ff7e.png

Yeah you need to remove the Windows drive from fstab. Just delete the line with its UUID and save and reboot and everything should work.

Asus Zephurs Duo 2023:

 

CPU: 7945HX

GPU: 4090M

OS: BazziteOS

Link to post
Share on other sites

59 minutes ago, CosmicEmotion said:

Yeah you need to remove the Windows drive from fstab. Just delete the line with its UUID and save and reboot and everything should work.

STOP

There is no "windows drive" in that fstab.

Stick your windows drive in, boot up, the post the output of lsblk here.

The uuid mounted @/boot/efi might (I doubt it) be on the nvme, in which case we can mess about and duplicate it for an "exclusive mint" drive.

 

This is why you comment your fstab people...

Link to post
Share on other sites

6 hours ago, Ralphred said:

STOP

There is no "windows drive" in that fstab.

Stick your windows drive in, boot up, the post the output of lsblk here.

The uuid mounted @/boot/efi might (I doubt it) be on the nvme, in which case we can mess about and duplicate it for an "exclusive mint" drive.

 

This is why you comment your fstab people...

I didn't notice the filesystem true. Good catch.

Asus Zephurs Duo 2023:

 

CPU: 7945HX

GPU: 4090M

OS: BazziteOS

Link to post
Share on other sites

17 hours ago, Ralphred said:

STOP

There is no "windows drive" in that fstab.

Stick your windows drive in, boot up, the post the output of lsblk here.

The uuid mounted @/boot/efi might (I doubt it) be on the nvme, in which case we can mess about and duplicate it for an "exclusive mint" drive.

 

This is why you comment your fstab people...

Good call. Screenshotat2024-09-2316-46-45.png.3208046d994594088147bc22e42c5d04.png

System Specs: Second-class potato, slightly mouldy

Link to post
Share on other sites

So, we are going to duplicate /dev/nvme1n1p1 on /dev/sda1. Note: Don't close your terminal until you've finished - we are storing the new UUID of the disk in a local variable.

 

We need to make sure the partition /dev/sda1 is "set-up" ready to be an EFI parition seen by the UEFI bios.

Run fdisk and check out the partition: (it might complain about "drive in use" or similar, you can ignore it.)

user@host ~ $ sudo fdisk /dev/sda
Welcome to fdisk (util-linux 2.39.4).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/sda: [SIZE] GiB, [SIZE] bytes, [NUMBER] sectors
Disk model: [make and model]
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE

Device         Start       End   Sectors   Size Type
/dev/sda1       xxxx    yyyyyy    zzzzzz   512M EFI System  << THIS HERE
/dev/sda2     xxxxxx	yyyyyy	zzzzzzzz   [about a gig] [doesn't matter]

### If it doesn't say "EFI System" follow below to change it, if it does say EFI System just press 'q' then enter.

Command (m for help): t
Partition number (1-4, default 4): 1
Partition type or alias (type L to list all): 1

Changed type of partition '[something not EFI System]' to 'EFI System'.

Command (m for help): w
### fdisk writes change and exits###

Now format /dev/sda1 as vfat so the UEFI bios can see it properly:

sudo mkfs.fat -F 32 /dev/sda1

Next we need the partition sda1's UUID:

user@host ~ $ UUID=$(blkid|sed -n '/\/dev\/sda1/s/\/dev\/sda1: UUID="\(.*\)" BLOCK_SIZE.*/UUID=\1/p');echo ${UUID}
UUID=XXXX-YYYY

If you don't get any output, just run blkid and post that output here and don't carry on just yet.

Now make a place for the new EFI to be mounted, and mount it:

sudo mkdir -p /mnt/newEFI
sudo mount ${UUID} /mnt/newEFI

And to copy the contents:

sudo cp -aux /boot/efi/* /mnt/newEFI/
sudo diff -r /boot/efi/ /mnt/newEFI/

Both commands should report nothing, if they don't post the error here.

Now we need to update /etc/fstab:

sudo cp /etc/fstab /etc/fstab.bak-$(date +%y%m%d-%H:%M:%S)
sudo sed -i "s/UUID=FE72-8DEE/${UUID}/" /etc/fstab

Now if you shut down, take out the nvme, and power up, it should work. You can delete /mnt/newEFI if you like.

 

If it doesn't work you can install https://www.ext2fsd.com* in windows, and copy your fstab.bak-[datestamp] over the altered /etc/fstab to be (almost) back at square one.

 

*(before the new ntfs3 driver was added to the kernel, I used ext2fsd to share steam libraries between windows and linux, it's very a stable and mature driver despite only being version 0.69)

Link to post
Share on other sites

On 9/25/2024 at 9:15 PM, Ralphred said:

So, we are going to duplicate /dev/nvme1n1p1 on /dev/sda1. Note: Don't close your terminal until you've finished - we are storing the new UUID of the disk in a local variable.

 

We need to make sure the partition /dev/sda1 is "set-up" ready to be an EFI parition seen by the UEFI bios.

Run fdisk and check out the partition: (it might complain about "drive in use" or similar, you can ignore it.)

user@host ~ $ sudo fdisk /dev/sda
Welcome to fdisk (util-linux 2.39.4).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/sda: [SIZE] GiB, [SIZE] bytes, [NUMBER] sectors
Disk model: [make and model]
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE

Device         Start       End   Sectors   Size Type
/dev/sda1       xxxx    yyyyyy    zzzzzz   512M EFI System  << THIS HERE
/dev/sda2     xxxxxx	yyyyyy	zzzzzzzz   [about a gig] [doesn't matter]

### If it doesn't say "EFI System" follow below to change it, if it does say EFI System just press 'q' then enter.

Command (m for help): t
Partition number (1-4, default 4): 1
Partition type or alias (type L to list all): 1

Changed type of partition '[something not EFI System]' to 'EFI System'.

Command (m for help): w
### fdisk writes change and exits###

Now format /dev/sda1 as vfat so the UEFI bios can see it properly:

sudo mkfs.fat -F 32 /dev/sda1

Next we need the partition sda1's UUID:

user@host ~ $ UUID=$(blkid|sed -n '/\/dev\/sda1/s/\/dev\/sda1: UUID="\(.*\)" BLOCK_SIZE.*/UUID=\1/p');echo ${UUID}
UUID=XXXX-YYYY

If you don't get any output, just run blkid and post that output here and don't carry on just yet.

Now make a place for the new EFI to be mounted, and mount it:

sudo mkdir -p /mnt/newEFI
sudo mount ${UUID} /mnt/newEFI

And to copy the contents:

sudo cp -aux /boot/efi/* /mnt/newEFI/
sudo diff -r /boot/efi/ /mnt/newEFI/

Both commands should report nothing, if they don't post the error here.

Now we need to update /etc/fstab:

sudo cp /etc/fstab /etc/fstab.bak-$(date +%y%m%d-%H:%M:%S)
sudo sed -i "s/UUID=FE72-8DEE/${UUID}/" /etc/fstab

Now if you shut down, take out the nvme, and power up, it should work. You can delete /mnt/newEFI if you like.

 

If it doesn't work you can install https://www.ext2fsd.com* in windows, and copy your fstab.bak-[datestamp] over the altered /etc/fstab to be (almost) back at square one.

 

*(before the new ntfs3 driver was added to the kernel, I used ext2fsd to share steam libraries between windows and linux, it's very a stable and mature driver despite only being version 0.69)

Not sure what happened, but it didn't work. Ended up booting into emergency mode. I just reinstalled Linux with the Windows drive removed (after backing up my files, or course)

System Specs: Second-class potato, slightly mouldy

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×