prevent mounting of local disks

Post here if you are a new Porteus member and you're looking for some help.
wolfgang6444
White ninja
White ninja
Posts: 11
Joined: 26 May 2018, 08:12
Distribution: centos7

prevent mounting of local disks

Post#1 by wolfgang6444 » 26 May 2018, 08:18

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

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

prevent mounting of local disks

Post#2 by brokenman » 26 May 2018, 20:47

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.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

prevent mounting of local disks

Post#3 by Ed_P » 26 May 2018, 21:42

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/
Ed

wolfgang6444
White ninja
White ninja
Posts: 11
Joined: 26 May 2018, 08:12
Distribution: centos7

prevent mounting of local disks

Post#4 by wolfgang6444 » 27 May 2018, 05:12

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

wolfgang6444
White ninja
White ninja
Posts: 11
Joined: 26 May 2018, 08:12
Distribution: centos7

prevent mounting of local disks

Post#5 by wolfgang6444 » 27 May 2018, 05:42

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

wolfgang6444
White ninja
White ninja
Posts: 11
Joined: 26 May 2018, 08:12
Distribution: centos7

prevent mounting of local disks

Post#6 by wolfgang6444 » 27 May 2018, 06:08

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

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

prevent mounting of local disks

Post#7 by Ed_P » 27 May 2018, 06:13

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.
Ed

wolfgang6444
White ninja
White ninja
Posts: 11
Joined: 26 May 2018, 08:12
Distribution: centos7

prevent mounting of local disks

Post#8 by wolfgang6444 » 27 May 2018, 07:15

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

donald
Full of knowledge
Full of knowledge
Posts: 2064
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

prevent mounting of local disks

Post#9 by donald » 27 May 2018, 10:20

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
Last edited by donald on 27 May 2018, 10:33, edited 1 time in total.

wolfgang6444
White ninja
White ninja
Posts: 11
Joined: 26 May 2018, 08:12
Distribution: centos7

prevent mounting of local disks

Post#10 by wolfgang6444 » 27 May 2018, 10:33

That's the syntax I was looking for!

Much more portable this way.

It works.

many thanks,

Wolfgang

donald
Full of knowledge
Full of knowledge
Posts: 2064
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

prevent mounting of local disks

Post#11 by donald » 27 May 2018, 10:34

;)

Post Reply