Installing on internal SSD: mounted partition does not show as target.

Post here if you are a new Porteus member and you're looking for some help.
carsti
White ninja
White ninja
Posts: 13
Joined: 03 Jul 2024, 22:57
Distribution: Mint

Installing on internal SSD: mounted partition does not show as target.

Post#1 by carsti » 03 Jul 2024, 23:08

Hi,

I created a bootable USB as described in the README: MBR Usb Stick. Single Partition (FAT32). Copied EFI, boot and porteus and used it to boot into my little laptop.

Then I open Menu > System > Porteus Installer. It only shows me my USB stick in the list. Not the internal SSD device. I go into the partition manager and delete all partitions on the SSD and create a single ext4 partition. It does not show in the "install target" list, even after a refesh list. I can mount it from the installer and it shows me a little dialog that it is now added to the list - but it is not. There is just one item and it is the USB stick I booted from.

I tried formatting the single partition on the SSD to FAT32. Still no luck. It doesn't show up in the list, even after a Refesh of the list. I tried many other things. Restarted the installer, etc. No luck.

Any idea what I am doing wrong? In the Youtube video, the available partitions are all shown in the list. They just select one and install.

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

Installing on internal SSD: mounted partition does not show as target.

Post#2 by Ed_P » 04 Jul 2024, 05:11

Very strange. :hmmm:

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 4290
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

Installing on internal SSD: mounted partition does not show as target.

Post#3 by ncmprhnsbl » 04 Jul 2024, 05:23

hi, is your porteus fully up to date?

Code: Select all

cat /etc/porteus/*
i ask because this was supposed to be fixed :)
can i also have the output of:

Code: Select all

df -TH|sed -e '/Filesystem/d' -e '/aufs/d'|sed -e 's/fuseblk/NTFS/g' -e 's/vfat/FAT/g'|awk 'BEGIN{FS=OFS=" "}{$5=$6="";gsub(FS"+",FS)}1'
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

carsti
White ninja
White ninja
Posts: 13
Joined: 03 Jul 2024, 22:57
Distribution: Mint

Installing on internal SSD: mounted partition does not show as target.

Post#4 by carsti » 04 Jul 2024, 06:06

Code: Select all

001-core.xzm:20240511
002-xorg.xzm:20240511
002-xtra.xzm:20240511
003-mate.xzm:20231229
initrd.xz:20230923

Code: Select all


df -TH|sed -e '/Filesystem/d' -e '/aufs/d'|sed -e 's/fuseblk/NTFS/g' -e 's/vfat/FAT/g'|awk 'BEGIN{FS=OFS=" "}{$5=$6="";gsub(FS"+",FS)}1'
tmpfs tmpfs 1.1G 1.8M /mnt/live
devtmpfs devtmpfs 1.1G 0 /dev
/dev/mmcblk0p1 ext4 16G 25k /mnt/mmcblk0p1
/dev/sda1 FAT 7.9G 530M /mnt/sda1
tmpfs tmpfs 1.3G 91M /mnt/live/memory/changes
/dev/loop0 squashfs 143M 143M /mnt/live/memory/images/000-kernel.xzm
/dev/loop1 squashfs 130M 130M /mnt/live/memory/images/001-core.xzm
/dev/loop2 squashfs 120M 120M /mnt/live/memory/images/002-xorg.xzm
/dev/loop3 squashfs 20M 20M /mnt/live/memory/images/002-xtra.xzm
/dev/loop4 squashfs 18M 18M /mnt/live/memory/images/003-mate.xzm
/dev/loop5 squashfs 89M 89M /mnt/live/memory/images/vivaldi-3.8.2259.42-i386-en-US-1.xzm
tmpfs tmpfs 1.1G 45M /dev/shm
tmpfs tmpfs 4.2M 0 /sys/fs/cgroup
tmpfs tmpfs 206M 29k /run/user/1000


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

Installing on internal SSD: mounted partition does not show as target.

Post#5 by Ed_P » 04 Jul 2024, 06:50

The output of this command would be useful also carsti.

Code: Select all

uname -a

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 4290
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

Installing on internal SSD: mounted partition does not show as target.

Post#6 by ncmprhnsbl » 04 Jul 2024, 07:39

carsti wrote:
04 Jul 2024, 06:06
/dev/mmcblk0p1 ext4 16G 25k /mnt/mmcblk0p1
i'm guessing this is the internal drive?
technically, this is a eMMC (embedded multimedia card) akin to a SD card, as opposed to a NVME SSD.
so yeah, the fix was for nvme ssds.. however, something similar might work for eMMC..
if you could overwrite(as root) /opt/porteus-scripts/pinstaller with this:

Code: Select all

#!/bin/bash

## Author: brokenman <[email protected]>
## Script to install porteus from live running system (perhaps livecd)
## onto an internal or removeable drive.
## Requires gtkdialog v8.0+

#exec 2>/dev/null

gtk_message(){
export GTK_MESSAGE='
<window window_position="1" title="Porteus message" icon-name="cdr" allow-shrink="false" width-request="'$2'">
<vbox>
 <hbox>
  <frame>
  <pixmap icon_size="6">
   <input file stock="'$3'"></input>
  </pixmap>
  </frame>
  <frame>
  <text wrap="true"><label>"'$1'"</label></text>
  </frame>
 </hbox>
 <hbox>
  <button ok></button>
 </hbox>
</vbox>
</window>
'
gtkdialog -p GTK_MESSAGE >/dev/null
};export -f gtk_message

## Are we root?
if [ $DISPLAY ]; then
	if [ $EUID -ne 0 ]; then
		gtk_message "You must be root to run the Porteus installer application!" 450 gtk-dialog-warning
		exit
	fi
		else
	echo
	echo "This program requires an X session!"
	echo
	exit
fi

trap cleanup_bailout SIGHUP SIGINT SIGTERM

## Set variables
export WRK=/tmp/pinstaller
export ANSW=$WRK/.answ
LOG=/tmp/.pinstallog
export PIDLOCK=/tmp/.pinstaller.lock
export DUMP=$WRK/.junk
export pixmaps=/usr/share/pixmaps/porteus

# Get current logged in user
# Value is returned as $LUSER (Logged in user)
# $LHOME (Logged in user home)
. /usr/share/porteus/porteus-functions
#get_user
#get_user_home
for a in $(loginctl --no-legend list-users | awk '{print$NF}')
do 
	export $(loginctl -p Name show-user $a)
	if [ $(loginctl -p State show-user $Name) = "State=active" ]; then
	export LUSER=$Name
	fi
done
if [ $LUSER != "root" ]; then
	export LHOME=/home/$Name
else
	export LHOME=/root
fi

## Check for our PIDLOCK
## Check for an already running version
isrunning=`ps aux |grep PINSTALLER|sed '/grep/d'|awk '{print$2}'`

if [ -f $PIDLOCK ]; then
  gtk_message "Only one instance of pinstaller may run at any one time. If pinstaller is not already running then remove $PIDLOCK file and restart." 500 gtk-dialog-warning
  exit
fi

## Setup working directories
[ -d $WRK ] && rm -rf $WRK 2>&-
mkdir $WRK

## Setup some blank files for dynamic input
touch $WRK/target-drive-info
touch $WRK/pre-text.txt
touch $WRK/target
touch $PIDLOCK

# get desktop info
startx=`ps x | grep -c /usr/bin/startx`
if [ $startx -eq 2 ]; then
    lxde=`ps x | grep -v grep | grep -c /usr/bin/lxsession`
    kde5=`ps x | grep -v grep | grep -c /usr/bin/startplasma-x11`
    lxqt=`ps x | grep -v grep | grep -c lxqt-session`
    xfce=`ps x | grep -v grep | grep -c xfdesktop`
else
    lxde=`ps aux | sed '/X '$(echo $DISPLAY|cut -d. -f1)'/,$ !d' | sed '1,/X / !d' | grep -c /usr/bin/lxsession`
    kde5=`ps aux | sed '/ '$DISPLAY' /,$ !d' | sed '1,/X / !d' | grep -c /usr/bin/startplasma-x11`
    lxqt=`ps aux | sed '/ '$DISPLAY' /,$ !d' | sed '1,/X / !d' | grep -c razor-session`
    xfce=`ps aux | sed '/ '$(echo $DISPLAY|cut -d. -f1)' /,$ !d' | sed '1,/X / !d' | grep -c xfdesktop`
fi
[ "$lxde" ] && export DSESS=lxde
[ "$kde5" ] && [ `uname -m|grep 64` ] && export DSESS=kde5
[ "$xfce" ] && export DSESS=xfce
[ "$lxqt" ] && export DSESS=lxqt

## Get the location of the boot folder
export modules=`ls -l /mnt/live/porteus/modules|awk '{print$NF}'|sed 's@//@/@g'`
export porteus=`echo ${modules%/*}|sed 's^//^/^g'`
if [ $porteus ]; then
	export pbase=${porteus%/*}
	if [ -d $pbase/boot ]; then
		export bdir=$pbase/boot
		export efidir=$pbase/EFI
		export cheat=$bdir/docs/cheatcodes.txt
		export cmdline=`</proc/cmdline`
	fi
		else
	export porteus=unknown
fi

## Get current changes location from porteus.cfg and back it up for testing
#cp $bdir/porteus.cfg $WRK/porteus.cfg
#export cchanges=`cat /proc/cmdline|grep -o "[^ ]*changes[^ ]*"`


##### Start functions

get_drive_info(){

## Dump drive info
[ -f $WRK/partinfo.tmp ] && rm $WRK/partinfo.tmp
df -TH|sed -e '/Filesystem/d' -e '/aufs/d'|sed -e 's/fuseblk/NTFS/g' -e 's/vfat/FAT/g'|awk 'BEGIN{FS=OFS=" "}{$5=$6="";gsub(FS"+",FS)}1' > $WRK/dump
sed -i 's/ /|/g' $WRK/dump
for a in `cat $WRK/dump`; do
	d=`echo $a | cut -d/ -f3 | cut -d"|" -f1`
	c=`echo $a|awk -F"/" '{print $(NF-1)}'`
	dev=`echo $d|tr -d [:digit:]`
	## Workaround for removable devices mounted with random string
	## Thanks for the bug report Ahau
	ismedia=`echo $c|grep media`
	israndom=`echo $d|grep "-"|grep [0-9]`
	if [ "$ismedia" -a "$israndom" ]; then
		d=`echo $a|awk -F"|" '{print$1}'|cut -d '/' -f3`
		dev=`echo $d|tr -d [:digit:]`
	fi
	if [[ `echo $d|grep disk` ]]; then
		dev=`mount|grep $d|awk '{print$1}'|awk -F/ '{print$NF}'|tr -d [:digit:]`
	fi
	## Workaround for nvme SDDs
	if [[ `echo $d | grep nvme` ]]; then
		dev=`mount | grep /dev | grep $d | awk '{print$1}'|awk -F/ '{print$NF}' | awk -F"p[0-9]" '{print$1}' | uniq`
	fi
	## Workaround for eMMcs
	if [[ `echo $d | grep mmcblk` ]]; then
		dev=`mount | grep /dev | grep $d | awk '{print$1}'|awk -F/ '{print$NF}' | awk -F"p[0-9]" '{print$1}' | uniq`
	fi
	fixrem=`cat /sys/block/$dev/removable 2>/dev/null`
	if [ -d /dev/disk/by-label ]; then
		if [[ `ls /dev/disk/by-label -l|grep $d 2>/dev/null` ]]; then
			label=`ls /dev/disk/by-label -l|grep $d|awk '{print$9}'`
				else
			label=unknown
		fi
	fi
	[ "$fixrem" == "1" ] && echo "$a|removable|$label" >> $WRK/partinfo.tmp
	[ "$fixrem" == "0" ] && echo "$a|internal|$label" >> $WRK/partinfo.tmp
done < $WRK/dump
grep "|" $WRK/partinfo.tmp > $WRK/partinfo2.tmp
mv $WRK/partinfo2.tmp $WRK/partinfo.tmp
}; export -f get_drive_info



partition_manager(){
. /usr/lib/librokenman
`which gparted` || $(dbus-launch --exit-with-session partitionmanager) || gtk_message "You have no GUI partition manager. Please open a terminal and use cfdisk to prepare partitions." 500 gtk-dialog-warning
}; export -f partition_manager

## 1=text 2=width 3=gtk-stock icon
gtk_yesno(){
export YESNO='
<window window_position="1" title="yes or no" icon-name="cdr" allow-shrink="false" width-request="'$2'">
<vbox>
 <hbox>
  <frame>
  <pixmap icon_size="6">
   <input file stock="'$3'"></input>
  </pixmap>
  </frame>
  <frame>
  <text><label>"'$1'"</label></text>
  </frame>
 </hbox>
 <hbox>
  <button yes></button>
  <button no></button>
 </hbox>
</vbox>
</window>
'
gtkdialog -c -p YESNO > $WRK/.yesno
}; export -f gtk_yesno

main_menu(){
export PINSTALLER_DIALOG='
<window window_position="1" title="Porteus Installer" default_height="460" default_width="550" image-name="/usr/share/pixmaps/porteus/usbstick-128.png" border_width="20">
<vbox default_height="400">
<notebook show-tabs="false" show-border="false" labels="Welcome|Install|Tools">
	<vbox>
	<hbox>
	<pixmap spacing="10">
		<input file>'$pixmaps'/computer-128.png</input>
		<width>128</width>
	</pixmap>
	<vbox>
		<text use-markup="true" xalign="0"><label>"<span font-family='"'purisa'"' weight='"'bold'"' size='"'x-large'"'><small>Welcome to the Porteus Installer</small></span>"</label></text>
		<text use-markup="true" width-request="420" xalign="0">
		<label>The porteus installer allows you to install Porteus to a USB or fixed drive. You must have a partition prepared to copy porteus onto. Please make a choice from the menu below.</label>
		</text>
	</vbox>
	</hbox>
	<hbox>
		<text use-markup="true" xalign="0"><label>"<span font-family='"'purisa'"' weight='"'bold'"' size='"'large'"'><small>PLUG IN YOUR USB DEVICE AND REFRESH!</small></span>"</label></text>
		<pixmap icon_size="2" tooltip-text="No need to restart the program if you forgot to plug in your device. Just plug it in and click refresh!">
			<input file stock="gtk-help"></input>
		</pixmap>
	</hbox>
			<tree rules_hint="true" exported_column="0">
				<variable>DRIVES</variable>
				<label>Device|Type|Size|Used|Mounted on|Type|Label</label>
				<input file>"'$WRK/partinfo.tmp'"</input>
				<height>200</height><width>540</width>
				<action signal="cursor-changed">echo "$DRIVES" > "'$WRK/target'"</action>
				<action signal="button-press-event">Enable:BUTNEXTONE</action>
			<action>"'create_pixmap_scene2'"</action>
			<action>Refresh:P2</action>
			<action>"'get_target_drive_info'"</action>
			<action>refresh:TRGDRV</action>
			<action>"'get_pre_text'"</action>
			<action>refresh:PRETXT</action>
			<action>echo 1 > '"$PIDLOCK"'</action>
			<action>refresh:nbkMain</action>

			</tree>
		<text use-markup="true" xalign="0" default_width="550"><label>"<span weight='"'bold'"' size='"'small'"'>Select your target drive and click '"'next'"'</span>"</label></text>
	<hbox>
		<button tooltip-text="Partition manager" sensitive="true">
			<label>Partition manager</label>
			<input file>/usr/share/pixmaps/porteus/piechart-128.png</input>
			<width>16</width>
			<action>partition_manager &</action>
		</button>
		<button>
			<label>Refresh list</label>
			<input file stock="gtk-refresh"></input>
			<action>"'get_drive_info'"</action>
			<action>Refresh:DRIVES</action>
		</button>
		<button>
			<label>Mount a partition</label>
			<input file stock="gtk-harddisk"></input>
			<action>"'mount_partition'"</action>
			<action>Refresh:DRIVES</action>
		</button>
		<button cancel></button>
		<button sensitive="false">
			<variable>BUTNEXTONE</variable>
			<label>Next</label>
			<input file stock="gtk-go-forward"></input>
			<action>"'create_pixmap_scene2'"</action>
			<action>Refresh:P2</action>
			<action>"'get_target_drive_info'"</action>
			<action>refresh:TRGDRV</action>
			<action>"'get_pre_text'"</action>
			<action>refresh:PRETXT</action>
			<action>echo 1 > '"$PIDLOCK"'</action>
			<action>refresh:nbkMain</action>
		</button>
	</hbox>
</vbox>


	<vbox>
	<hbox>
		<pixmap>
			<input file>'$WRK/pixmap.png'</input>
			<variable>P2</variable>
			<width>120</width>
		</pixmap>
	<vbox>
	<hbox>
	<vbox>
		<text use-markup="true" xalign="0" default_width="400"><label>"<span weight='"'bold'"' size='"'large'"'>Target drive information</span>"</label></text>
			<tree rules_hint="true" exported_column="0">
				<variable>TRGDRV</variable>
				<label>Target drive|Type|Size|Used|Type|Label</label>
				<input file>"'$WRK/target-drive-info'"</input>
				<width>430</width><height>70</height>
			</tree>
	</vbox>
	</hbox>
	</vbox>
	</hbox>

		<text use-markup="true" xalign="0" default_width="400"><label>"<span weight='"'bold'"' size='"'large'"'>IMPORTANT INFORMATION TO READ!</span>"</label></text>
		<hseparator></hseparator>
			<text default_width="540" xalign="0">
			<variable>PRETXT</variable>
			<label>default txt</label>
			<input file>"'$WRK/pre-text.txt'"</input>
			</text>
			<checkbox active="false" tooltip-text="Read the warning and accept">
				<label>I understand and accept the warning above</label>
				<variable>ACCEPT</variable>
				<action>if true enable:BUTNEXTACCEPT</action>
				<action>if false disable:BUTNEXTACCEPT</action>
				<action>if true enable:BLOADER</action>
				<action>if false disable:BLOADER</action>
			</checkbox>
			<hseparator></hseparator>
	<hbox>
		<text use-markup="true" xalign="0" yalign="0" default_width="540"><label>"<b>OPTION INFORMATION</b>
By default this installer will simply copy the Porteus files onto your target device. <i>You must tick the bootloader option</i> in order to have a bootable Porteus. If you do not select this option, you must run the file on the target device called <b>Porteus-installer-for-Linux.com</b> in order for Porteus to boot."</label></text>
	</hbox>
			<checkbox sensitive="false" active="false" tooltip-text="READ THE WARNING ABOVE!!">
				<label>Install bootloader</label>
				<variable>BLOADER</variable>
				<action>if true echo bloader=$BLOADER > "'$WRK/bloader'"</action>
				<action>if false echo bloader=$BLOADER > "'$WRK/bloader'"</action>
			</checkbox>
			<hseparator></hseparator>
	<hbox>
		<button>
			<label>Go back</label>
			<input file stock="gtk-go-back"></input>
			<action>echo 0 > '"$PIDLOCK"'</action>
			<action>refresh:nbkMain</action>
		</button>
		<button cancel></button>
		<button sensitive="false">
		<variable>BUTNEXTACCEPT</variable>
			<label>Next</label>
			<input file stock="gtk-go-forward"></input>
			<action>"'pre_install_checks'"</action>
		</button>
	</hbox>
</vbox>
	<vbox>
	<hbox>
	<pixmap>
		<input file>'$pixmaps'/toolbox-128.png</input>
		<width>128</width>
	</pixmap>
	<vbox>
		<text use-markup="true" xalign="0" default_width="450"><label>"<span  weight='"'bold'"' size='"'large'"'>Partition management tools</span>"</label></text>
		<text use-markup="true" default_width="420" xalign="0">
		<label>The porteus installer allows you to install Porteus to a USB or fixed drive. Partition tools are available if you need to create or format a partition before installation. Please choose a drive below and click next.</label>
		</text>
	</vbox>
	</hbox>
		<button>
			<label>Go back</label>
			<input file stock="gtk-go-back"></input>
			<action>echo 0 > '"$PIDLOCK"'</action>
			<action>refresh:nbkMain</action>
		</button>
</vbox>
<variable>nbkMain</variable>
<input file>"'$PIDLOCK'"</input>
</notebook>
</vbox>
</window>
'
gtkdialog -p PINSTALLER_DIALOG > $DUMP
}



create_pixmap_scene2(){
export trg=`< $WRK/target`
if [ `grep $trg $WRK/partinfo.tmp|grep internal` ]; then
	cp $pixmaps/hd-128.png $WRK/pixmap.png
		else
	cp $pixmaps/usbstick-128.png $WRK/pixmap.png
fi
}; export -f create_pixmap_scene2

get_target_drive_info(){
trg=`< $WRK/target`
for target in `cat $WRK/target`; do
  export FS=`grep $target $WRK/partinfo.tmp|awk -F"|" '{print$2}'`
  SIZE=`grep $target $WRK/partinfo.tmp|awk -F"|" '{print$3}'`
  USED=`grep $target $WRK/partinfo.tmp|awk -F"|" '{print$4}'`
  MNTPNT=`grep $target $WRK/partinfo.tmp|awk -F"|" '{print$5}'`
  REMFIX=`grep $target $WRK/partinfo.tmp|awk -F"|" '{print$6}'`
done
grep $trg $WRK/partinfo.tmp|sed 's/|/@/g'|awk 'BEGIN{FS=OFS="@"}{$5="";gsub(FS"+",FS)}1'|sed 's/@/|/g' > $WRK/target-drive-info
}; export -f get_target_drive_info

mount_partition(){
## Get unmounted drives
echo "" > $WRK/unmounted.tmp
[ -f $WRK/mount-options ] && rm $WRK/mount-options
#blkid -o list|grep "not mounted"|sed '/swsuspend/d'|awk '{print$1}' > $WRK/unmounted.tmp
lsblk -lo PATH,MOUNTPOINT,TYPE,SIZE | grep -Ev 'PATH|loop|disk|SWAP|mnt|1K' |awk '{print$1}' > $WRK/unmounted.tmp

## Create info file to show user
while read drives; do
	d=${drives##*/}
	bl=`echo $d|tr -d [:digit:]`
	name=${drives}
	type=`fdisk -l|grep $name|awk '{print$NF}'`
	size=`df -TH $name|grep dev|awk '{print$3}'`
	avail=`df -TH $name|grep dev|awk '{print$4}'`
	[ "`cat /sys/block/$bl/removable 2>/dev/null`" == "1" ] && remov=removable || remove=internal
	echo "$name|$type|$size|$avail|$remov" >> $WRK/mount-options
done < $WRK/unmounted.tmp

export MOUNT_PARTITION='
<window window_position="1" title="Partition Mounter" default_height="440" default_width="550" icon-name="cdr" allow-shrink="false" border_width="20">
	<vbox>
	<hbox>
		<pixmap spacing="10">
			<input file>'$pixmaps'/white-tick-128.png</input>
			<width>128</width>
		</pixmap>
	<vbox>
		<text use-markup="true" xalign="0"><label>"<span weight='"'bold'"' size='"'x-large'"'><small>Mount your partition</small></span>"</label></text>
		<text use-markup="true" default_width="420" xalign="0">
		<label>After selecting your partition click the mount button and wait a short time. Your partition should be added to the list. If not then restart the application with your partition already mounted. </label>
		</text>
	</vbox>
	</hbox>
		<text use-markup="true" xalign="0"><label>"<span font-family='"'purisa'"' weight='"'bold'"' size='"'large'"'><small>CHOOSE A PARTITION TO MOUNT</small></span>"</label></text>
			<tree rules_hint="true" exported_column="0">
				<variable>MOUNT</variable>
				<label>File system|Type|Size|Used|State</label>
				<input file>"'$WRK/mount-options'"</input>
				<height>200</height><width>540</width>
			</tree>
	<hbox>
		<button cancel></button>
		<button>
			<label>Mount now</label>
			<input file stock="gtk-yes"></input>
			<action type="exit">MOUNTED</action>
		</button>

	</hbox>
	</vbox>
</window>
'
gtkdialog -p MOUNT_PARTITION > $ANSW

## Parse results
if [[ `egrep "Cancel|abort" $ANSW` ]]; then
  exit
fi

## Remove apostrophes from answer file
sed -i 's/"//g' $ANSW

## Get drive to mount
drive=`grep "MOUNT=" $ANSW|awk -F= '{print$NF}'`

## Create mountpoint
base=${drive##*/}
mntpoint=/mnt/$base
[ ! -d $mntpoint ] && mkdir $mntpoint

## Mount the drive
mount $drive $mntpoint

## Refresh drive info
get_drive_info

## Notify user to refresh menu
gtk_message "Drive was mounted successfully.It is now in the list." 450 gtk-yes &

}; export -f mount_partition

chkbut(){
[[ `egrep "Cancel|abort" $ANSW` ]] && { cleanup; error_log "User aborted"; exit; }

}; export -f chkbut

cleanup(){
rm -rf $WRK 2>&-
}

error_log(){
date +%c > $LOG
echo "$1" >> $LOG
}

get_pre_text(){
if [ `grep removable $WRK/target-drive-info` ]; then
cat > $WRK/pre-text.txt << EOF
Porteus will now be installed to the usb drive shown above. Any existing data on the drive will remain intact, however if you choose the option below to run the boot loader then ONLY PORTEUS WILL BOOT FROM THIS DEVICE.
EOF
	else
cat > $WRK/pre-text.txt << EOF
Porteus will now be installed to the fixed drive shown above. Any existing data on the drive will remain intact, however should you decide to choose the option below to run the boot loader then ONLY PORTEUS WILL BOOT FROM THIS DEVICE.
EOF
fi
}; export -f get_pre_text

pre_install_checks(){
pchk=$WRK/precheck
## Get available space on drive
psize=300000
export trg=`< $WRK/target`
base=${trg##*/}
export mntpnt=`grep $trg $WRK/partinfo.tmp|awk -F"|" '{print$5}'`

## Get current running porteus location
export porteuspath=${porteus}
[ -z "$porteuspath" ] && echo porteusp=false || porteusp=true

## Check if target has sufficient space
tsize=`df $trg|tail -n1|awk '{print$4}'`
[ "$tsize" -gt "$psize" ] && space=true || space=false

## Get the partition type
export ptype=`awk -F"|" '{print$2}' $WRK/target-drive-info`

## Check if there are cheat codes
if [ -f $WRK/cheatcode-choice ]; then
	cheats=`<$WRK/cheatcode-choice`
		else
	cheats=false
fi

## Check if there are changes
if [ -f $WRK/changes-folder ]; then
	changes=`<$WRK/changes-folder`
		else
	changes=false
fi

## Check if user chose to install bootloader
if [ -f $WRK/bloader ];then
	bloader=`<$WRK/bloader`
		else
	bloader=false
fi

## Check if a windows folder exists on target
[ `ls $mntpnt|grep "Windows"` ] && windows=true || windows=false
[ `ls $mntpnt|grep "bootmgr"` ] && windows=true || windows=false

cat > $pchk << EOF
porteus:$porteusp
target:$trg
mntpnt:$mntpnt
space:$space
partition:$ptype
cheats:$cheats
changes:$changes
windows:$windows
bloader:$bloader
EOF

## Remount partition due to udisks bug
umount $trg 2>/dev/null
umount $trg 2>/dev/null
mount $trg $mntpnt || MFAIL=0

## If the unmount remount failed then give a message
if [ "$MFAIL" ]; then
	gtk-message "There was a problem unmounting and remounting your device. We cannot continue." 500 gtk-stop
	rm $WRK
	suicide
fi

## No use going any further if there is not enough space
if [ `grep "space:false" $pchk` ]; then
	export NOSPACE=1
	gtk_message "There is not sufficient space on your target device. Please ensure you have at least 300Mb available on your target device before restarting this application." 500 gtk-stop
	rm $WRK
	suicide
fi

## If a windows folder exists on target give the poor souls a notice
if [ "$windows" == "true" ]; then
export WINFOUND='
<window window_position="1" title="WARNING!!" image-name="/usr/share/pixmaps/porteus/alert.png" allow-shrink="false" default_width="500">
	<vbox>
	<hbox>
		<pixmap>
			<input file>"'$pixmaps/windows-64.png'"</input>
			<width>64</width>
		</pixmap>
		<text use-markup="true" xalign="0" default_width="400"><label>"<span weight='"'bold'"' size='"'x-large'"'>    DO YOU HAVE WINDOWS?</span>"</label></text>
	</hbox>
		<hseparator></hseparator>
		<text use-markup="true" default_width="450"><label>"There were some files found on the target drive that may belong to a windows installation. You should know that if you continue this install (<i>and you chose the bootloader option</i>) then your windows installation may <b>no longer be bootable.</b>"</label>
		</text>
	<hbox>
		<button cancel></button>
		<button>
			<label>Continue</label>
			<input file stock="gtk-go-right"></input>
		</button>
	</hbox>
	</vbox>
</window>
'
gtkdialog -p WINFOUND >$DUMP 2>$DUMP

[[ `egrep "Cancel|abort" $DUMP` ]] && { cleanup; exit; }
fi

## Check for nonposix filesystem on destination in case of files in rootcopy or changes folder
df -T $mntpnt | tail -n1 | awk '{print$2}' | egrep -qo "ntfs|vfat" && nonposix=0

## Check for rootcopy files or changes folder and warn about FAT32
[[ `find $mntpnt/porteus/rootcopy -type f` ]] && hasrawfiles=0
haschanges=`find /mnt/sdd1 -maxdepth 3 -type d -name changes`
if [ "$haschanges" ]; then if [[ `find $haschanges -type f` ]]; then hasrawfiles=0; fi; fi
if [ "$nonposix" ] && [ "$hasrawfiles" ]; then
	gtk_yesno "A nonposix (FAT32/NTFS) file system was detected at $mntpnt. The files you have in any changes or rootcopy will lose permissions and symlinks and may end in a broken installation. Would you like to continue?" 500 gtk-dialog-error
	if [ `egrep "abort|No" $WRK/.yesno` ]; then
		touch /tmp/.doublecheck
		rm -rf $WRK
		suicide
	fi
fi
unset haschanges

## We definitely don't want to continue if user chose to abort
if [ -f /tmp/.doublecheck ]; then
	rm /tmp/.doublecheck
	[ -d $WRK ] && rm -rf $WRK
	suicide
	exit
fi

copy_porteus_files
};export -f pre_install_checks

copy_porteus_files(){
[ $NOSPACE ] && exit && suicide
manual_progress "Copying files now"
echo "Transfering boot to $mntpnt" > $WRK/in
cp -R $bdir $mntpnt
echo "Transfering EFI to $mntpnt" > $WRK/in
cp -R $efidir $mntpnt
echo "Transfering porteus to $mntpnt ..NOT copying changes.." > $WRK/in
#cp -R $porteuspath/* $mntpnt || echo "Porteus exists" >> /tmp/pinstaller.log
if [ $nonposix ]; then
	rsync -r --mkpath $pbase/porteus/{base,modules,rootcopy,optional} $mntpnt/porteus || echo "Porteus exists" >> /tmp/pinstaller.log
else
	rsync -a --mkpath $pbase/porteus/{base,modules,rootcopy,optional} $mntpnt/porteus || echo "Porteus exists" >> /tmp/pinstaller.log
fi
cp $pbase/porteus/* $mntpnt/porteus #>/dev/null 2>&1
cp $pbase/* $mntpnt
sync
## Make a check for any rootcopy files and adjust guest ownerships
if [ ! $nonposix ];then
[ -d $mntpnt/porteus/rootcopy/$LHOME ] && chown -R $LUSER: $mntpnt/porteus/rootcopy/$LHOME
fi
kill_manual_progress

## Copy the new porteus.cfg file
#cp $WRK/porteus.cfg $mntpnt/boot/porteus.cfg

## If user chose NOT to install bootloader then notify we are done
if [ `grep "bloader:" $pchk|grep false` ]; then
	gtk_message "Porteus has been copied to: $mntpnt you may now either edit your own bootloader, or enter the boot directory on $mntpnt and run the Porteus-installer-for-Linux.com file" 500 gtk-yes
	rm -rf $WRK
	suicide
	exit
fi

install_boot_loader
};export -f copy_porteus_files

install_boot_loader(){
if [ "$NOSPACE" ]; then
  exit
  suicide
fi
cd $mntpnt/boot/ ### VERY IMPORTANT
#/opt/porteus-scripts/xorg/terminal -e "sh ./Porteus-installer-for-Linux.com"
xterm -e "sh ./Porteus-installer-for-Linux.com"
rm $WRK
suicide
};export -f install_boot_loader

suicide(){
	pipid=`ps x|grep PINSTALLER|awk '{print$1}'`
	kill $pipid >/dev/null 2>&-
};export -f suicide

manual_progress(){
# Open a window for progress
export MANUAL_PROGRESS='
<window title="Porteus message"  icon-name="cdr">
<vbox>
  <frame>
    <text default_width="310">
      <label>"'$1'"</label>
      <variable>PROGRESS_TXT</variable>
    </text>
    <progressbar visible="true">
      <variable>PROGRESS_BAR</variable>
      <label>...</label>
      <input>prog_counter</input>
    </progressbar>
  </frame>
		<text use-markup="true" xalign="0" default_width="400"><label>"<span weight='"'bold'"' size='"'large'"'>DO NOT UNPLUG YOUR DEVICE</span>"</label></text>
</vbox>
</window>
'
gtkdialog -c -p MANUAL_PROGRESS 2>$WRK/.progress_trap &
}; export -f manual_progress

## This is called by the manual_progress function. 
prog_counter(){

while [ A != B ]; do
    MSG=`cat $WRK/in`
    echo $MSG
    sleep 0.3
done
echo "ALL DONE"
unset STATE

}; export -f prog_counter

kill_manual_progress() {
myself=`ps ax|grep MANUAL_PROGRESS|awk '{print$1}'|head -n1`
for children in `ps -o pid --ppid $myself|sed '/PID/d'`; do
kill $children >/dev/null 2>&-
done
kill $myself >/dev/null 2>&-
}; export -f kill_manual_progress

installer_stream(){

export PINSTALER_STREAM='
<window window-position="1" title="Installing Porteus" resizable="true"
   default_width="500" icon-name="cdr" default_height="460">
   <vbox>
	<text use-markup="true"><label>"<span weight='"'bold'"' size='"'small'"'>When build completes please read END of log.</span>"</label></text>
      <vbox scrollable="true">
         <text wrap="false" default_height="400" xalign="0">
            <variable>txtStream</variable>
            <input>tail -n 20 /tmp/ppm/.stream</input>
         </text>
      </vbox>
      <hbox>
         <button>
		<label>Convert</label>
		<variable>STREAMER</variable>
		<input file icon="cdr"></input>
		<action>"'sbo_check_error'"</action>
	</button>
         <button>
		<label>Exit</label>
		<input file stock="gtk-no"></input>
		<action type="exit">USEREXIT</action>
	</button>
      </hbox>
      <timer interval="2" visible="false">
         <action>refresh:txtStream</action>
      </timer>
   </vbox>
   <action signal="hide">exit:Exit</action>
</window>
'
gtkdialog -p PINSTALER_STREAM > $DUMP
popd >/dev/null
};export -f installer_stream

cleanup_bailout(){
rm -rf $WRK 2>&-
rm $PIDLOCK 2>&-
};export -f cleanup_bailout

## Check if porteus was booted in copy2ram
if [ `grep -o "^copy2ram" /etc/bootcmd.cfg` ]; then
	gtk_message "This application can not be used if booting Porteus with copy2ram cheatcode." 400 gtk-dialog-error
	rm -rf $WRK
	suicide
fi

get_drive_info
main_menu
cleanup_bailout
and see how that goes..
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

carsti
White ninja
White ninja
Posts: 13
Joined: 03 Jul 2024, 22:57
Distribution: Mint

Installing on internal SSD: mounted partition does not show as target.

Post#7 by carsti » 05 Jul 2024, 03:53

Now the install worked. Thanks!
I also checked the "install boot loader" option. It reported that it worked, but at reboot it wasn't able to boot. In the UEFI Boot Manager it still shows two "ubuntu" boot entries (previously Linux Mint was installed), with a cryptic path containing the word 'MBR'. I did wipe everything on the install drive via Gparted > Device > Create Partition Table. It seems something is left over somewhere. Maybe I should have selected to 'gpt' in GParted? UEFI black magic is annoying.

On the other hand Linux Mint and MX Linux did manage to properly sink their hooks in the UEFI boot process. Other distributions create a 256MB EFI-System fat32 partition on the drive when installing. The UEFI probably looks for that partition during boot.

Funnily, when I plug in the Porteus USB Stick and select it in the UEFI boot manager manually it boots from the internal harddisk and I can unmount the USB stick once it is booted. Everything is loaded from the internal harddisk. It seems just booting is a problem.

Any suggestions what I should do before installing Porteus, so the boot works?

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 4290
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

Installing on internal SSD: mounted partition does not show as target.

Post#8 by ncmprhnsbl » 05 Jul 2024, 04:32

carsti wrote:
05 Jul 2024, 03:53
Now the install worked. Thanks!
:good:
carsti wrote:
05 Jul 2024, 03:53
In the UEFI Boot Manager
carsti wrote:
05 Jul 2024, 03:53
I also checked the "install boot loader" option.
ok, didn't catch that you're using uefi, in that case, you do need a fat32 partition for at least the /boot and /EFI folders.
the /porteus can be on a separate ext4 partition for using a changes folder and rootcopy..
all you need do is partition and place those folders, no need to "install the bootloader", that's only for legacy bios mbr. (and msdos partition table should be ok, no need for gpt)
note the gui installer doesn't handle this, but it's easy enough to do with a root filemanager.
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

carsti
White ninja
White ninja
Posts: 13
Joined: 03 Jul 2024, 22:57
Distribution: Mint

Installing on internal SSD: mounted partition does not show as target.

Post#9 by carsti » 07 Jul 2024, 22:25

Thanks. Everything works now except Audio output. I can't even plug in headphones. All silent. Only shows dummy output.

Code: Select all


I: [pulseaudio] module.c: Unloaded "module-position-event-sounds" (index: #19).
I: [pulseaudio] module.c: Unloading "module-systemd-login" (index: #18).
I: [pulseaudio] module.c: Unloaded "module-systemd-login" (index: #18).
I: [pulseaudio] module.c: Unloading "module-console-kit" (index: #17).
I: [pulseaudio] module.c: Unloaded "module-console-kit" (index: #17).
I: [pulseaudio] module.c: Unloading "module-suspend-on-idle" (index: #16).
I: [pulseaudio] module.c: Unloaded "module-suspend-on-idle" (index: #16).
I: [pulseaudio] module.c: Unloading "module-intended-roles" (index: #15).
I: [pulseaudio] module.c: Unloaded "module-intended-roles" (index: #15).
I: [pulseaudio] module.c: Unloading "module-null-sink" (index: #14).
I: [pulseaudio] core.c: default_sink: auto_null -> (unset)
I: [pulseaudio] core.c: default_source: auto_null.monitor -> (unset)
I: [pulseaudio] sink.c: Freeing sink 0 "auto_null"
I: [pulseaudio] source.c: Freeing source 0 "auto_null.monitor"
I: [pulseaudio] module.c: Unloaded "module-null-sink" (index: #14).
I: [pulseaudio] module.c: Unloading "module-always-sink" (index: #13).
I: [pulseaudio] module.c: Unloaded "module-always-sink" (index: #13).
I: [pulseaudio] module.c: Unloading "module-default-device-restore" (index: #11).
I: [pulseaudio] module.c: Unloaded "module-default-device-restore" (index: #11).
I: [pulseaudio] module.c: Unloading "module-native-protocol-unix" (index: #10).
I: [pulseaudio] module.c: Unloaded "module-native-protocol-unix" (index: #10).
I: [pulseaudio] module.c: Unloading "module-bluetooth-policy" (index: #8).
I: [pulseaudio] module.c: Unloaded "module-bluetooth-policy" (index: #8).
I: [pulseaudio] module.c: Unloading "module-alsa-card" (index: #6).
I: [pulseaudio] card.c: Freed 0 "alsa_card.pci-0000_00_1b.0"
I: [pulseaudio] module.c: Unloaded "module-alsa-card" (index: #6).
I: [pulseaudio] module.c: Unloading "module-udev-detect" (index: #5).
I: [pulseaudio] module.c: Unloaded "module-udev-detect" (index: #5).
I: [pulseaudio] module.c: Unloading "module-switch-on-port-available" (index: #4).
I: [pulseaudio] module.c: Unloaded "module-switch-on-port-available" (index: #4).
I: [pulseaudio] module.c: Unloading "module-augment-properties" (index: #3).
I: [pulseaudio] module.c: Unloaded "module-augment-properties" (index: #3).
I: [pulseaudio] module.c: Unloading "module-card-restore" (index: #2).
I: [pulseaudio] module.c: Unloaded "module-card-restore" (index: #2).
I: [pulseaudio] module.c: Unloading "module-stream-restore" (index: #1).
I: [pulseaudio] module.c: Unloaded "module-stream-restore" (index: #1).
I: [pulseaudio] module.c: Unloading "module-device-restore" (index: #0).
I: [pulseaudio] module.c: Unloaded "module-device-restore" (index: #0).
I: [pulseaudio] main.c: Daemon terminated.
guest@porteus:~/Desktop$ 


Code: Select all


lsmod | grep snd
snd_hda_codec_hdmi     73728  1
snd_soc_sst_cht_bsw_rt5645    24576  0
snd_hda_intel          36864  0
snd_hda_codec         135168  2 snd_hda_codec_hdmi,snd_hda_intel
snd_hda_core           69632  3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
snd_hwdep              12288  1 snd_hda_codec
snd_sof_acpi_intel_byt    12288  0
snd_sof_acpi           12288  1 snd_sof_acpi_intel_byt
snd_sof_intel_atom     12288  1 snd_sof_acpi_intel_byt
snd_sof_xtensa_dsp     16384  1 snd_sof_acpi_intel_byt
snd_sof               233472  3 snd_sof_intel_atom,snd_sof_acpi,snd_sof_acpi_intel_byt
snd_sof_utils          12288  1 snd_sof
snd_intel_sst_acpi     12288  1
snd_soc_acpi_intel_match    77824  2 snd_sof_acpi_intel_byt,snd_intel_sst_acpi
snd_soc_acpi           12288  4 snd_sof_intel_atom,snd_soc_acpi_intel_match,snd_intel_sst_acpi,snd_soc_sst_cht_bsw_rt5645
snd_intel_sst_core     40960  1 snd_intel_sst_acpi
snd_soc_sst_atom_hifi2_platform    90112  2 snd_intel_sst_core
snd_soc_rt5645        163840  2 snd_soc_sst_cht_bsw_rt5645
snd_soc_rt5640        126976  0
snd_soc_rl6231         12288  2 snd_soc_rt5640,snd_soc_rt5645
snd_soc_core          241664  5 snd_sof,snd_soc_rt5640,snd_soc_sst_atom_hifi2_platform,snd_soc_rt5645,snd_soc_sst_cht_bsw_rt5645
snd_intel_dspcfg       28672  4 snd_hda_intel,snd_sof,snd_sof_acpi_intel_byt,snd_intel_sst_acpi
snd_compress           16384  1 snd_soc_core
snd_pcm               126976  12 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_sof,snd_soc_rt5640,snd_compress,snd_soc_sst_atom_hifi2_platform,snd_soc_core,snd_sof_utils,snd_soc_rt5645,snd_hda_core,snd_soc_sst_cht_bsw_rt5645
snd_timer              36864  1 snd_pcm



nanZor
Shogun
Shogun
Posts: 489
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 5.1 Alpha OpenBox

Installing on internal SSD: mounted partition does not show as target.

Post#10 by nanZor » 08 Aug 2024, 23:42

Possibility depending on hardware: Go into the pulseaudio volume control, and go into the Configuration tab. Sometimes not seen since it is the very rightmost tab, and if window is too small, only revealed by a right-triangle. :)

Check if your profile is correct, (and check box too) and change if needed, for instance in some of my cases, changing from data/hdmi to analog-stereo option.
That's a UNIX book - cool. -Garth

Post Reply