new install to usb, doesnt make it bootable

Post here if you are a new Porteus member and you're looking for some help.
User avatar
Ed_P
Contributor
Contributor
Posts: 3398
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: new install to usb, doesnt make it bootable

Post#31 by Ed_P » 21 Aug 2015, 18:24

zander wrote:hi
got to do search what extramod does
also i think u saving changes to fat partition, and im trying to get them saved on ext4?
Extramod is where my .xzm apps/modules are stored. Flashplayer, Java, Porteus updates, OOoLight, etc.

Yes, I am saving changes to a FAT partition because it is the only partition I have on the flash drive. The single FAT partition allows me to save files on it that are accessible on any machine I plug it into; Windows, MAC, Android, Linux.
Ed

User avatar
brokenman
Site Admin
Site Admin
Posts: 5651
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: new install to usb, doesnt make it bootable

Post#32 by brokenman » 21 Aug 2015, 20:39

Shouldn't the cheatcode be like it was shown in the top quote?
Yes. In the post I was just highlighting the from= cheatcode. First you want to get it booting, then worry about saving changes.

@Zander, double check you got the right UUID. If that doesn't want to work you can look at other from= cheatcodes. You may use /mnt/sdXy or /dev/sdXy. Check them out in the docs folder.

Please post the output of blkid and your refind.conf file where you have inserted this line.
How do i become super user?
Wear your underpants on the outside and put on a cape.

zander
Black ninja
Black ninja
Posts: 37
Joined: 19 Aug 2015, 16:36
Distribution: 3.1
Location: usa

Re: new install to usb, doesnt make it bootable

Post#33 by zander » 22 Aug 2015, 08:39

brokenman wrote:
Shouldn't the cheatcode be like it was shown in the top quote?
Yes. In the post I was just highlighting the from= cheatcode. First you want to get it booting, then worry about saving changes.

@Zander, double check you got the right UUID. If that doesn't want to work you can look at other from= cheatcodes. You may use /mnt/sdXy or /dev/sdXy. Check them out in the docs folder.

Please post the output of blkid and your refind.conf file where you have inserted this line.


hi brokenman, here it is
also messge on boot is 'cant find porteus-v3.1-x386-x64- .... sgn file
and i moved porteus folder from fat32 to ext4 , as you said

guest@porteus:~$ su
Password:
root@porteus:/home/guest# blkid
/dev/sda1: LABEL="WINRE" UUID="809E5DB09E5DA008" TYPE="ntfs"
/dev/sda2: UUID="DE80-F8A1" TYPE="vfat"
/dev/sda4: UUID="BABCACF3BCACAAF9" TYPE="ntfs"
/dev/sda6: UUID="2E46539446535C21" TYPE="ntfs"
/dev/sda7: LABEL="RECOVERY" UUID="0C865B21865B0B1A" TYPE="ntfs"
/dev/sdb1: LABEL="UUI" UUID="1EE6-0A4E" TYPE="vfat"
/dev/sdb2: LABEL="saved changes" UUID="c5264ed2-8661-4701-a33f-97b9d742efc8" TYPE="ext4"
/dev/sdb3: LABEL="swap" UUID="17d88bc4-a851-43da-93a1-b6bbbc9b2aee" TYPE="swap"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/loop4: TYPE="squashfs"
/dev/loop5: TYPE="squashfs"
/dev/loop6: TYPE="squashfs"
root@porteus:/home/guest#



# to work.
menuentry "My Mac OS X" {
icon \EFI\refind\icons\os_mac.png
volume "OS X boot"
loader \System\Library\CoreServices\boot.efi
disabled
}

menuentry "Porteus GUI mode" {
volume KERNELS
icon EFI/BOOT/icons/os_porteus.png
loader boot/syslinux/vmlinuz
initrd boot/syslinux/initrd.xz
options "from=UUID=1EE6-0A4E"
submenuentry "Save changes" {
add_options "changes=/porteus"
}
submenuentry "Always fresh" {
add_options "nomagic base_only norootcopy"
}
submenuentry "Boot to copy2ram mode" {
add_options "copy2ram"
}
submenuentry "Text mode" {
add_options "3"
}
submenuentry "pxe-boot" {
add_options "pxe"
}
}


zander
Black ninja
Black ninja
Posts: 37
Joined: 19 Aug 2015, 16:36
Distribution: 3.1
Location: usa

Re: new install to usb, doesnt make it bootable

Post#34 by zander » 22 Aug 2015, 08:57

or this , brings up same error msg ' cant find porteus - v3.1-..... sgn file

menuentry "Porteus GUI mode" {
volume KERNELS
icon EFI/BOOT/icons/os_porteus.png
loader boot/syslinux/vmlinuz
initrd boot/syslinux/initrd.xz
options "from=UUID:1EE6-0A4E"
submenuentry "Save changes" {
add_options "changes=/porteus"
}
submenue

neko
DEV Team
DEV Team
Posts: 990
Joined: 09 Feb 2013, 09:55
Distribution: APorteus-FVWM-ja-x86_64.iso
Location: japan

Re: new install to usb, doesnt make it bootable

Post#35 by neko » 22 Aug 2015, 10:28

@zander

I updated a live-usb tool to fit the example that was explained at this thread.
viewtopic.php?f=81&t=4937&start=15#p36124

If you use this tool, and then create persistent data and modify the configuration as explained,
your Porteus will be booted with persistent data from the USB.

You may create a SWAP partition by shrinking ext4 partition with the GUI tool GParted.


live-usb tool: Please refer to
viewtopic.php?f=75&t=4788#p34856



Good luck!

User avatar
francois
Contributor
Contributor
Posts: 5116
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: new install to usb, doesnt make it bootable

Post#36 by francois » 22 Aug 2015, 11:30

In the menu of the grub.cfg from your blkid output in the from= cheatcode statement should appear the info for /dev/sdb2, that is :UUID=c5264ed2-8661-4701-a33f-97b9d742efc8 and not UUID=1EE6-0A4E.

The problem here is that you cannot change directly grub.cfg. See:
https://forum.porteus.org/viewtopic.php?f=48&t=1790

With grub2, you have to change 40_custom file in which there is the pertinent info for grub.conf. and then use the update-grub command to get these changes in grub.conf updated.
Voltaire: Le mieux est l'ennemi du bien.

User avatar
francois
Contributor
Contributor
Posts: 5116
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: new install to usb, doesnt make it bootable

Post#37 by francois » 22 Aug 2015, 11:49

@neko:
For sake of clarity for zander, is there some need for the save.dat on /dev/sdb2. This is Linux file system?
Voltaire: Le mieux est l'ennemi du bien.

neko
DEV Team
DEV Team
Posts: 990
Joined: 09 Feb 2013, 09:55
Distribution: APorteus-FVWM-ja-x86_64.iso
Location: japan

Re: new install to usb, doesnt make it bootable

Post#38 by neko » 22 Aug 2015, 12:18

@francois

1."is there some need for the save.dat on /dev/sdb2"
It has been explained at this thread.
viewtopic.php?f=81&t=4937&start=15#p36124

the 2nd one is ext4 for a container of persistence dat.

Example: persistent data size was set to 200M
[ From Terminal ]

Code: Select all

# mount /dev/sdb2 /mnt/sdb2
# cd /mnt/sdb2
# ls
lost+found/
# mkdir persistent
# cd persistent
# dd of=porteus.persist count=0 seek=200000000
# mkfs.ext4 porteus.persist
2."This is Linux file system?"
Yes, it is a Linux file system.
It is a loop file and it contains ext4 file system.


Thanks.

User avatar
brokenman
Site Admin
Site Admin
Posts: 5651
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: new install to usb, doesnt make it bootable

Post#39 by brokenman » 24 Aug 2015, 00:54

from=UUID=1EE6-0A4E

should be

from=UUID:c5264ed2-8661-4701-a33f-97b9d742efc8 <---- note there is only one = sign.

So your setup should be like this:
The FAT32 partition has the EFI and boot folder. It's UUID is 1EE6-0A4E. It is the first partition. You edit the refind.conf file that is on this partition with the above from= code.
The ext4 partition has the porteus folder. It's UUID is c5264ed2-8661-4701-a33f-97b9d742efc8.

So the FAT32 partition is what the system boots from, and it is told that porteus is on the second ext4 partition. You can also put changes=UUID:c5264ed2-8661-4701-a33f-97b9d742efc8/changes (create a folder on the root of the ext4 partition called changes) and you don't need a savefile.dat to save your changes. This is only used when saving changes on non linux partition (FAT).
How do i become super user?
Wear your underpants on the outside and put on a cape.

neko
DEV Team
DEV Team
Posts: 990
Joined: 09 Feb 2013, 09:55
Distribution: APorteus-FVWM-ja-x86_64.iso
Location: japan

Re: new install to usb, doesnt make it bootable

Post#40 by neko » 24 Aug 2015, 02:07

@brokenman
wrote
... you don't need a savefile.dat to save your changes.
This is only used when saving changes on non linux partition (FAT).
Can't a savefile.dat (ext4 loop file) be used on linux partition ?

ISO@/boot/syslinux/initrd.xz@/linuxrc: line 214 ~ 229

Code: Select all

	if [ -d /mnt/$DEV/$LPTH ]; then
	    mkdir -p /mnt/$DEV/$LPTH/changes 2>/dev/null && \
	    mount -o bind /mnt/$DEV/$LPTH/changes /memory/changes && touch /memory/changes/._test1 2>/dev/null
	else
	    if blkid /mnt/$DEV/$LPTH 2>/dev/null | cut -d" " -f3- | grep -q _LUKS; then
		for x in dm_crypt cryptd cbc sha256_generic aes_generic aes_x86_64; do modprobe $x 2>/dev/null; done
		losetup /dev/loop2 /mnt/$DEV/$LPTH
		echo $i"found encrypted .dat container"
		/opt/000-kernel/sbin/cryptsetup luksOpen /dev/loop2 crypt
		fsck_dat /dev/mapper/crypt
		mount /dev/mapper/crypt /memory/changes 2>/dev/null && touch /memory/changes/._test1 2>/dev/null
	    else
		fsck_dat /mnt/$DEV/$LPTH
		mount -o loop /mnt/$DEV/$LPTH /memory/changes 2>/dev/null && touch /memory/changes/._test1 2>/dev/null
	    fi
	fi
My understand is that there is not a condition about '/mnt/$DEV/$LPTH' on non linux partition.
Is this incorrect ?
line 227:
"mount -o loop /mnt/$DEV/$LPTH /memory/changes 2>/dev/null && touch /memory/changes/._test1 2>/dev/null"


Thanks.

User avatar
brokenman
Site Admin
Site Admin
Posts: 5651
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: new install to usb, doesnt make it bootable

Post#41 by brokenman » 24 Aug 2015, 03:41

Correct Neko. There is no condition. I did say above that you don't NEED a savefile.dat to save your changes. Maybe I should have been more specific. This is only REQUIRED when saving on a non-posix compliant file system such as FAT.
How do i become super user?
Wear your underpants on the outside and put on a cape.

neko
DEV Team
DEV Team
Posts: 990
Joined: 09 Feb 2013, 09:55
Distribution: APorteus-FVWM-ja-x86_64.iso
Location: japan

Re: new install to usb, doesnt make it bootable

Post#42 by neko » 24 Aug 2015, 05:31

@brokenman
Thank you for your clear answer.
If I am incorrect, I should fix the initrd.xz that is rewritten by me.
Therefore I asked and confirmed to you.

I have a poor English.
When I need to understand exactly a program,
the English manual is not enough,
but it is useful for me to read the program source and to rewrite it.

When I translated the English of cheatcodes.txt to the Japanese of cheatcodes-ja.txt,
I rewrote the initrd.xz.

Thanks.

zander
Black ninja
Black ninja
Posts: 37
Joined: 19 Aug 2015, 16:36
Distribution: 3.1
Location: usa

Re: new install to usb, doesnt make it bootable

Post#43 by zander » 25 Aug 2015, 03:09

brokenman wrote:from=UUID=1EE6-0A4E

should be

from=UUID:c5264ed2-8661-4701-a33f-97b9d742efc8 <---- note there is only one = sign.

So your setup should be like this:
The FAT32 partition has the EFI and boot folder. It's UUID is 1EE6-0A4E. It is the first partition. You edit the refind.conf file that is on this partition with the above from= code.
The ext4 partition has the porteus folder. It's UUID is c5264ed2-8661-4701-a33f-97b9d742efc8.

So the FAT32 partition is what the system boots from, and it is told that porteus is on the second ext4 partition. You can also put changes=UUID:c5264ed2-8661-4701-a33f-97b9d742efc8/changes (create a folder on the root of the ext4 partition called changes) and you don't need a savefile.dat to save your changes. This is only used when saving changes on non linux partition (FAT).

@beokenman
thank you for walking through of this
so i did exacrly as u said , and noticed , if i dont mantion 'save changes option on boot, no changes will be done
is it normal? do i have eveey time set boot to save changes? can it be done on default boot automaticly
thnx

zander
Black ninja
Black ninja
Posts: 37
Joined: 19 Aug 2015, 16:36
Distribution: 3.1
Location: usa

Re: new install to usb, doesnt make it bootable

Post#44 by zander » 25 Aug 2015, 03:47

alao when im trying to access win hard drive, ''cant mount , hibernate state unsafe, read only mode' message pops up, i mean im pretty sure i ahut it down

User avatar
brokenman
Site Admin
Site Admin
Posts: 5651
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: new install to usb, doesnt make it bootable

Post#45 by brokenman » 25 Aug 2015, 14:08

Are you entering these values manually by hitting a key at the boot screen?

Changes can be made permanent by adding this line into the boot config file.
If you are booting on UEFI then it is /mnt/sdXy/EFI/BOOT/refind.conf
If you are booting with BIOS it is /mnt/sdXy/boot/syslinux/porteus.conf

Need more info about the win drive. What file system? (NTFS,FAT32)
How are you trying to access it? (console, file manager)
Do you run windows 8.1 or above?
Are you using the quickboot function in windows to boot faster?

Windows doesn't really shut down all the way anymore if you are using this function. You can probably force the drive to mount but I would just disable quickboot in the BIOS.
How do i become super user?
Wear your underpants on the outside and put on a cape.

Post Reply