You are not logged in.
I've reinstalled q4os after previous catastrophic user error, but still have my backup root.disk from my previous install. Is there any way to mount it directly as another drive in the new install? I know I can open it in 7zip in Windows and presumably in Linux to get to the files, but opening it is a slow process each time given the size of the file.
I feel it must be possible for Q4os to treat a filesystem created by q4os as a filesystem directly?
Offline
Yes, it's possible to mount the root.disk from within Q4OS terminal:
$ mkdir -p /tmp/mntpoint/
$ sudo losetup --show -f -P /<path_to>/root.disk
$ sudo mount /dev/loopX /tmp/mntpoint/
don't forget to unmount prior poweroff:
$ sudo umount /tmp/mntpoint/
$ sudo losetup -d /dev/loopX
substitute "loopX" for a loop device number issued by the "losetup" command, for ex. "loop1".
Last edited by q4osteam (2023-04-24 11:03)
Offline
Yes, it should be possible to mount the root.disk from within Q4OS terminal:
$ mkdir -p /tmp/mntpoint/
$ sudo losetup --show -f -P root.disk
$ sudo mount /dev/loop0 /tmp/mntpoint/don't forget to unmount prior poweroff:
$ sudo umount /tmp/mntpoint/
$ sudo losetup -d /dev/loop0
Thanks. I'll try that. When I tried to mount it using more general Linux commands, I kept getting told the disk file didn't exist so hopefully this will work better.
Is it possible to create shortcuts for those mount/ unmount commands? Or even better, get the OS to do it automatically on boot and end of session?
Offline
Yes, it should be possible to mount the root.disk from within Q4OS terminal:
$ mkdir -p /tmp/mntpoint/
$ sudo losetup --show -f -P root.disk
$ sudo mount /dev/loop0 /tmp/mntpoint/don't forget to unmount prior poweroff:
$ sudo umount /tmp/mntpoint/
$ sudo losetup -d /dev/loop0
"Losetup: root.disk: failed to set up loop device: No such file or directory"
Essentially the same error as the other methods I tried. I also put the file path (/media/sda3/root.disk) into the command to see if that made a difference, but it didn't.
Any suggestions?
(Really frustratingly bad experience with Q4OS this time round... it keeps pretending that my wireless hotspot doesn't exist, which is a pretty basic functionality on which to fail!)
Last edited by bretsim (2023-04-24 05:23)
Offline
(Really frustratingly bad experience with Q4OS this time round... it keeps pretending that my wireless hotspot doesn't exist, which is a pretty basic functionality on which to fail!)
I can see this may be frustrating. I suggest you raise a new topic in the support section and provide full details of how your hotspot is set up. To me that's using a mobile phone for wifi, to you it could mean something different.
If you're dual booting it could be that Windows is doing something funny with loading firmware which strips up the linux drivers.
Please run
inxi -SMCGx
in Konsole and include output in your new post.
Offline
bretsim wrote:(Really frustratingly bad experience with Q4OS this time round... it keeps pretending that my wireless hotspot doesn't exist, which is a pretty basic functionality on which to fail!)
I can see this may be frustrating. I suggest you raise a new topic in the support section and provide full details of how your hotspot is set up. To me that's using a mobile phone for wifi, to you it could mean something different.
If you're dual booting it could be that Windows is doing something funny with loading firmware which strips up the linux drivers.
Please runinxi -SMCGx
in Konsole and include output in your new post.
Thanks for taking the time to reply. I solved the WiFi issue by some combination of restarting the laptop and/or changing the SSID of the network.
The main issue of my post (mounting an old q4os .disk file from within q4os) remains unresolved, however.
Offline
"Losetup: root.disk: failed to set up loop device: No such file or directory"
You only need to specify path to the loop file and correct loop device number, so we have updated post with the original instructions https://www.q4os.org/forum/viewtopic.ph … 542#p24542
Offline
bretsim wrote:"Losetup: root.disk: failed to set up loop device: No such file or directory"
You only need to specify path to the loop file and correct loop device number, so we have updated post with the original instructions https://www.q4os.org/forum/viewtopic.ph … 542#p24542
Thanks! That seems to have done the trick.
Is there a way to do this automatically at every boot (and unmount at power down)
Offline
Yes, it's possible to mount the root.disk from within Q4OS terminal:
$ mkdir -p /tmp/mntpoint/
$ sudo losetup --show -f -P /<path_to>/root.disk
$ sudo mount /dev/loopX /tmp/mntpoint/don't forget to unmount prior poweroff:
$ sudo umount /tmp/mntpoint/
$ sudo losetup -d /dev/loopXsubstitute "loopX" for a loop device number issued by the "losetup" command, for ex. "loop1".
Coming back to this issue a few months on, and I would still love a way to automate this at startup if at all possible, rather than having to enter every command individually every time.
Is there a way? I guess it would also entail auto mounting the relevant partition too.
Offline
You could put those commands in a script and execute that. Since there are sudo commands it will be interactive, so full automation would involve messing with system files. Before going that far, experiment by creating a text file with the desired commands, then execute it with "sh textfile".
Offline