Page 1 of 1

prevent mounting of local disks

Posted: 26 May 2018, 08:18
by wolfgang6444
Hello, I am new to porteus.
I want to use it primarily as a safe way to log into open wlan networks.
So I do not want the local partitions of my notebook being mounted - I want to work off the USB-stick with porteus exclusively if I boot from it.
Is there a persistent way of preventing the local harddisk from being mounted at boot-time?

Wolfgang

prevent mounting of local disks

Posted: 26 May 2018, 20:47
by brokenman
Hi Wolfgang.

Yes there is. With the cheatcodes you can do this. Please take a look at the FAQ document in the menu, on the installation media in the docs folder or on our website.

The cheatcode is nohd or noauto depending which suits your needs. Cheatcodes should be placed in the porteus.cfg file, or you can test it by adding it to the boot line during boot.

prevent mounting of local disks

Posted: 26 May 2018, 21:42
by Ed_P
brokenman wrote:
26 May 2018, 20:47
Please take a look at the FAQ document in the menu
:%) The forum's menu's FAQ on this page index.php links to this: app.php/help/faq which I don't think is the menu you mean. I think you mean the FAQ on this page: http://porteus.org/

prevent mounting of local disks

Posted: 27 May 2018, 05:12
by wolfgang6444
Well,

I have added
Append nohd
to boot/syslinux/porteus.cfg.

Now the system does not boot anymore:
searching for porteus-v4.0-x86_64.cfg, device not ready yet?

It appears to me that the USB-stick is also considered a hd and this does not get mounted.

Wolfgang

prevent mounting of local disks

Posted: 27 May 2018, 05:42
by wolfgang6444
In order to work around the problem I tried
Append from=/dev/device as cheatcode.
But that does not seem to work (even without nohd).

I tried from=/dev/sdb => no success
I tried from=/dev/sdb1 => no success
I tried from=/dev/disk/by-id/... => no success
I tries from=/dev/disk/by-uuid/... => no scuccess

Any example on how to use the from=/dev/device code as mentioned in the doc?

Wolfgang

prevent mounting of local disks

Posted: 27 May 2018, 06:08
by wolfgang6444
Well,

I managed to get it working with

APPEND from=/dev/sdb1 nohd

I recommend to edit the doc-entry from=/dev/device to from=/dev/partition.
Furthermore it does not seem to work with the more portable reference:
from=/dev/disk/by-uuid/...

Thanks,

Wolfgang

prevent mounting of local disks

Posted: 27 May 2018, 06:13
by Ed_P
wolfgang6444 wrote:
27 May 2018, 05:12
I have added
Append nohd
to boot/syslinux/porteus.cfg.
nohd or noauto should be added to the existing APPEND operand in the menu entry(s) you intend to use. For example:

Code: Select all

LABEL GRAPHICAL
MENU LABEL Graphics mode
KERNEL /boot/syslinux/vmlinuz
INITRD /boot/syslinux/initrd.xz
APPEND changes=/porteus nohd
TEXT HELP
    Run Porteus the best way we can.
    Try to autoconfigure graphics
    card and use the maximum
    allowed resolution
ENDTEXT
Please post the menu entry you modified in the porteus.cfg file.

prevent mounting of local disks

Posted: 27 May 2018, 07:15
by wolfgang6444
This is how it works for me:

LABEL GRAPHICAL
MENU LABEL Graphics mode
KERNEL /boot/syslinux/vmlinuz
INITRD /boot/syslinux/initrd.xz
#APPEND from=/dev/disk/by-uuid/..... nohd changes=/mnt/sdb1/porteussave.dat
APPEND from=/dev/sdb1 nohd changes=/mnt/sdb1/porteussave.dat
TEXT HELP
Run Porteus the best way we can.
Try to autoconfigure graphics
card and use the maximum
allowed resolution
ENDTEXT

prevent mounting of local disks

Posted: 27 May 2018, 10:20
by donald
sdb1 might not always be sdb1,(could become sdc1 etc),
depending on how many devices are connected.

Have you tried this variant?
APPEND from=UUID:your string here changes=UUID:your string here/path to save.dat your cheatcode here

to find out the UUID use the blkid command

prevent mounting of local disks

Posted: 27 May 2018, 10:33
by wolfgang6444
That's the syntax I was looking for!

Much more portable this way.

It works.

many thanks,

Wolfgang

prevent mounting of local disks

Posted: 27 May 2018, 10:34
by donald
;)