Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PINN can't mount boot partition to edit config.txt #150

Closed
Dunuin opened this issue May 3, 2018 · 9 comments
Closed

PINN can't mount boot partition to edit config.txt #150

Dunuin opened this issue May 3, 2018 · 9 comments
Labels

Comments

@Dunuin
Copy link

Dunuin commented May 3, 2018

Hi,

I'm running PINN 2.6.2 from an USB3.1-to-SSD-Adapter on a Pi3B+ with 3 custom OSs (Kali2 2018.1a Re4son Next Kernel, RetroPie3 4.4 and a NTFS data partition) and if I try to edit the config.txt files from the PINN menu, PINN tells me it can't mount the boot partition.
Wouldn't be a big problem, because PINN boots fine into both OSs and boot and root are successfully mounted after that so I can edit them manually, but I need to switch between DSI and HDMI and I would think PINN can't switch between config.hdmi and config.dsi then neighter.

I tried PINNs fsck but that finished without problems.

Edit:

RetroPie:
/etc/fstab

proc                                            /proc                           proc    defaults                0       0
PARTUUID=ee376293-06                            /boot                           vfat    defaults                0       2
PARTUUID=ee376293-07                            /                               ext4    defaults,noatime        0       1

#bm - Mount SSD Data partition
PARTUUID=ee376293-08                            /media/data                     ntfs    defaults                0       1

#bm - mount sdcard
UUID=3d343a73-1e39-40f4-a588-68dc8f67e982       /media/sdcard                   ext4    defaults,exec           0       1

/boot/os_config.json

{
 "description" : "Retropie 4.4 gaming distro using Emulation Station for RPi2/3B+",
 "flavour" : "Retropie3",
 "imagefolder" : "/tmp/media/sda1/os/Retropie3",
 "keyboard" : "us",
 "language" : "us",
 "partitions" : [
"/dev/sdb6",
"/dev/sdb7"
 ],
 "release_date" : "2018-04-28",
 "videomode" : 0
}

fdisk -l:

Device         Boot Start       End   Sectors  Size Id Type
/dev/mmcblk0p1       2048 124735487 124733440 59.5G 83 Linux


Disk /dev/sda: 232.9 GiB, 250059350016 bytes, 488397168 sectors
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: dos
Disk identifier: 0xee376293

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1            8192    137215    129024    63M  e W95 FAT16 (LBA)
/dev/sda2          137216 488136703 487999488 232.7G  5 Extended
/dev/sda5          139264    204797     65534    32M 83 Linux
/dev/sda6          204800    456703    251904   123M  c W95 FAT32 (LBA)
/dev/sda7          458752  82378749  81919998  39.1G 83 Linux
/dev/sda8        82378752 446922749 364543998 173.8G  7 HPFS/NTFS/exFAT
/dev/sda9       446922752 447174655    251904   123M  c W95 FAT32 (LBA)
/dev/sda10      447176704 488136703  40960000  19.5G 83 Linux

Maybe PINN tries to mount sdb6 instead of sda6 to mount the boot partition for editing the config.txt from the PINN menu? I installed my OSs from an USB stick which might have been sda and the ssd sdb while installing but now I'm just using the SSD alone.

@procount
Copy link
Owner

procount commented May 3, 2018

Maybe I forgot to adapt 'edit config' to work with USB attached storage instead of just looking at the SD card...? I will take a look.
Code looks ok. I will have to try it.

@procount
Copy link
Owner

procount commented May 3, 2018

Looking at your file dumps, it does seem that it would be looking at sdbX instead of sdaX.
I guess your SSD was mounted as sdb when you installed the OSes.

A quick workaround would be to edit the /settings/installed_os.json file and correct the partition references. (You should edit the boot/os_config.json files as well, but they are only used to rebuild the /settings/installed_os.json file in case it gets corrupted.)

Longer term, I need to modify it to use partuuids instead, thus avoiding this issue.

@procount procount added the bug label May 3, 2018
@Dunuin
Copy link
Author

Dunuin commented May 5, 2018

Works now after editing the "installed_os.json" and "os_config.json".

@procount
Copy link
Owner

procount commented May 5, 2018

Great!

Could you please explain exactly how you used PINN to install the OSes to your SSD, so I can prevent this happening in the future?

I think perhaps using partuuids will solve it in the future, but if you can remember what you did it would certainly help.

@Dunuin
Copy link
Author

Dunuin commented May 5, 2018

-used microSD with raspbian to set the onetime programmable fuse to allow boot from usb
-formated 256gb ssd with FAT32 and 8gb usb stick with ext3
-copied PINN to ssd and the 3 tar.xz-files to usb stick
-connected both with the Pi and powered it
-after pinn finished booting the usb stick was preselected as installation target and PINN asked if I want to overwrite the stick. I clicked "no" and used the dropdown to set the SSD as target (I think the SSD was sdb at that point)
-PINN was listing my local OS images on the stick, so I selected and installed them.
-I removed the stick and booted the Pi just with sdcard and ssd connected (with ssd now always being sda.

After changing all sdbX to sdaX in the json-files editing config.txt files works.

PartUUIDs would be great. I think my SSD is big enough for the moment and I can copy data via network shares, but it would be nice for the future to be able to use more then one usb storage device at the same time without breaking the dsi-hdmi-auto-switching.

@procount
Copy link
Owner

procount commented May 5, 2018

Thanks.

@procount
Copy link
Owner

procount commented May 9, 2018

Partuuids added to PINN v2.8, now released.

@procount procount closed this as completed May 9, 2018
@Dunuin
Copy link
Author

Dunuin commented Jul 2, 2018

Great. I updated PINN now. Do I need to edit config files to use partuuids instead of sdx or are OSs already installed fixed automatically? If not, what I need to edit?

@procount
Copy link
Owner

procount commented Jul 2, 2018

You don't NEED to edit them, unless it is causing you a problem. (They won't be fixed automatically).

I think the latest Fix feature might do it, but I suggest you take s backup first!

Select the installed os you want to change then in the fix option select "rerun partition_setup.sh".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants