[Solved]Corrupted boot due to mounted Win partition

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Arctic_Eddie
Level 2
Level 2
Posts: 55
Joined: Fri Oct 29, 2010 2:00 pm

[Solved]Corrupted boot due to mounted Win partition

Post by Arctic_Eddie »

I have installed Mint 20.2 Mate on an external USB drive. That drive is split into two partitions. The first is an old Windows partition that stores documents. The second is Mint. The system installed fine but on reboot, it stuck at initramfs. After numerous repairs, fsck, it would boot OK but fail the next time. I eventually found that the Windows partition had been mounted at boot but not unmounted at shutdown. Manually unmounting before shutdown fixed the problem. So the question is: how can I prevent the Windows partition from being mounted during boot, or how can I make sure it's unmounted at the start of shutdown.

I remember one time using the live stick installer that it asked if wanted to unmount the drive. I said no as I thought it was the partition where Mint would go. Is it advisable to just do the install again and say yes to the unmounting question? I've got some apps installed but can do it over again in a few hours.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
SimonPeter
Level 5
Level 5
Posts: 582
Joined: Tue Jul 13, 2021 5:13 am

Re: Corrupted boot due to mounted Win partition

Post by SimonPeter »

You can edit /etc/fstab as root to stop partition automounting.

A clean reinstall would also be a good option.
Arctic_Eddie
Level 2
Level 2
Posts: 55
Joined: Fri Oct 29, 2010 2:00 pm

Re: Corrupted boot due to mounted Win partition

Post by Arctic_Eddie »

The Linux machine is at another location but I'll do both suggestions tomorrow. I have another post about installed apps not appearing in the menu and your second recommendation may solve that problem.

Thanks
SimonPeter
Level 5
Level 5
Posts: 582
Joined: Tue Jul 13, 2021 5:13 am

Re: Corrupted boot due to mounted Win partition

Post by SimonPeter »

BTW have you verified the Linux ISO ?
https://linuxmint-installation-guide.re ... erify.html

How did you flash it ? (You should use Balena Etcher / mintstick / dd)
https://linuxmint-installation-guide.re ... /burn.html
Arctic_Eddie
Level 2
Level 2
Posts: 55
Joined: Fri Oct 29, 2010 2:00 pm

Re: Corrupted boot due to mounted Win partition

Post by Arctic_Eddie »

No, but I can do that now as the ISO is on this PC.

PS
MD256 is correct. Stick was written using the latest Rufus as an MBR for a W7 system. Just tried another stick with the same ISO but using the GPT boot on a W10 system and it's OK. I think the problem was not telling the installer to unmount the Win partition. The fstab idea should fix that but I think another clean install is best.
Arctic_Eddie
Level 2
Level 2
Posts: 55
Joined: Fri Oct 29, 2010 2:00 pm

Re: Corrupted boot due to mounted Win partition

Post by Arctic_Eddie »

I don't see a way of solving the problem in fstab. The UUID method seems to mount both partitions and not just /dev/sda5.

Code: Select all

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda5 during installation
UUID=4997f681-7b4d-4918-9f99-e7ca8ecfff88 /               ext4    errors=remount-ro 0       1
/swapfile                                 none            swap    sw              0       0
TheDancingJesus
Level 1
Level 1
Posts: 2
Joined: Mon Sep 20, 2021 9:11 pm

Re: Corrupted boot due to mounted Win partition

Post by TheDancingJesus »

I feel like this might relate to an issue I'm having.
Would Windows 10 mounting the partition at startup cause a problem such as:
being able to use Mint for a few minutes but then it freezes and restarts on it's own.
And on occassion, also causing similar issues on startup before even getting into the Mint homepage, where on startup it will (error sometimes) freeze and restart.
Arctic_Eddie
Level 2
Level 2
Posts: 55
Joined: Fri Oct 29, 2010 2:00 pm

Re: Corrupted boot due to mounted Win partition

Post by Arctic_Eddie »

The fstab file appears to mount only sda5 on the external drive, which is Mint. During installation, it asked me if I wanted to unmount a drive. It might have been referring to the whole drive so I said no. The sda1 partition is a W7 backup partition. It appears that one of two things happened. The installer used a UUID for the whole drive or BIOS mounted everything attached when I used F12 to select my boot drive and partition. One bug in Mint is a mounted Win partition is not cleanly unmounted at shutdown, as seen in the e2fsck repair summary. I see two choices. One is to tell the installer to unmount sda1 or make the whole drive for Mint by removing the Win partition.

Nothing on the W7 internal drive is mounted or used. Boot goes directly to the external drive and boots the second partition, sda5.
mikeflan
Level 16
Level 16
Posts: 6969
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: Corrupted boot due to mounted Win partition

Post by mikeflan »

TheDancingJesus wrote: Wed Sep 22, 2021 3:39 am I feel like this might relate to an issue I'm having.
Would Windows 10 mounting the partition at startup cause a problem such as:
being able to use Mint for a few minutes but then it freezes and restarts on it's own.
And on occassion, also causing similar issues on startup before even getting into the Mint homepage, where on startup it will (error sometimes) freeze and restart.
Possibly. Boot into Windows and disable faststartup:
https://www.windowscentral.com/how-disa ... st-startup
viewtopic.php?p=2067102#p2067102
https://youtu.be/4ZRU1J4FlLI

Then disable secure boot in your bios:
https://docs.microsoft.com/en-us/window ... ecure-boot

If you need more help we encourage you to start your own topic.
Arctic_Eddie
Level 2
Level 2
Posts: 55
Joined: Fri Oct 29, 2010 2:00 pm

Re: [Solved]Corrupted boot due to mounted Win partition

Post by Arctic_Eddie »

The problem was created during install when I declined to unmount an external USB drive that contained both an NTFS and EXT4 partition. The installation then included instructions to mount the NTFS partition. On shutdown, the partition was not cleanly unmounted which corrupted the drive. At next boot, it would stall at initramfs. It took e2fsck and fsck instructions from a live stick to fix the drive. As long as I unmounted the NTFS before shutdown, the next boot was OK.

At today's installation, I immediately unmounted the drive and defined the partitions on the external drive as 700GB for / in ext4 and 50GB for XFER in fat32. XFER is the location that will be common to both LM20.2 on the external drive and W7 on the internal drive. The XFER partition is visible in the file manager but is now cleanly unmounted at shutdown.

Bottom line, unmount any windows partition before running the installer.
Arctic_Eddie
Level 2
Level 2
Posts: 55
Joined: Fri Oct 29, 2010 2:00 pm

Re: [Solved]Corrupted boot due to mounted Win partition

Post by Arctic_Eddie »

A word of warning.
The windows partition does not get a volume name during LM installation. In the file manager, it just shows /Windows. DO NOT change/add a name while in Windows. This causes the LM boot to not recognize that partition and you will be trapped at the initramfs prompt. I decided to make the external drive all ext4 and use a separate stick for transfer, if needed.
Locked

Return to “Installation & Boot”