How to mount root partition on SD card

Kernel, Main, Utilities & Applications, Miscellaneous Devices.
syn
Posts: 17
Joined: Thu Dec 22, 2022 2:09 pm
Has thanked: 2 times
Been thanked: 4 times

How to mount root partition on SD card

Unread post by syn »

I have the MiSTer SD card plugged into my PC, but I can't mount the root partition. I can find only the MiSTer_Data partition.

There is a second 3MB partition on the card, but I'm unable to mount it. Linux doesn't seem to recognize the file system.

I need to fix something in /etc. How can I mount the root FS on the SD card?

User avatar
JamesH
Posts: 56
Joined: Sat Dec 26, 2020 11:41 am
Has thanked: 5 times
Been thanked: 15 times

Re: How to mount root partition on SD card

Unread post by JamesH »

The next update is going to overwrite it, so the practical advice would be to use /media/fat/linux/user-startup.sh to modify things you need every time system boots.

However, if you really want to update root fs and really understand all implications and side effects, the root fs is in the linux/linux.img. But, again, that is not what you want to do.

bbond007
Top Contributor
Posts: 531
Joined: Tue May 26, 2020 5:06 am
Has thanked: 87 times
Been thanked: 211 times

Re: How to mount root partition on SD card

Unread post by bbond007 »

syn wrote: Thu Nov 30, 2023 3:55 pm

I have the MiSTer SD card plugged into my PC, but I can't mount the root partition. I can find only the MiSTer_Data partition.

There is a second 3MB partition on the card, but I'm unable to mount it. Linux doesn't seem to recognize the file system.

I need to fix something in /etc. How can I mount the root FS on the SD card?

The root "partition" is not a partition on your SD card. It is the "linux.img" file on your data partition under "linux". To mount that all you need to do is use the "mount" command on your Linux (or Windows with WSL) machine...

From there you can modify what you need in the /etc/ directory.

Code: Select all

mkdir ~/mister_root
mount linux.img /home/bbond007/mister_root
cd ~/mister_root/etc

Hope that helps...

syn
Posts: 17
Joined: Thu Dec 22, 2022 2:09 pm
Has thanked: 2 times
Been thanked: 4 times

Re: How to mount root partition on SD card

Unread post by syn »

bbond007 wrote: Fri Dec 01, 2023 7:53 pm

The root "partition" is not a partition on your SD card. It is the "linux.img" file on your data partition under "linux". To mount that all you need to do is use the "mount" command on your Linux (or Windows with WSL) machine...

That's exactly what I needed to know. Thanks!

Post Reply