usb persistence

Post tutorials, HOWTO's and other useful resources here.
tome
Contributor
Contributor
Posts: 562
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Poland
Contact:

Re: usb persistence

Post#16 by tome » 12 Apr 2015, 18:28

Your porteus.cfg looks correct. What is your file-system on sdb1?

milangru
White ninja
White ninja
Posts: 12
Joined: 11 Apr 2015, 17:24
Distribution: Porteus KDE
Location: Novi Sad

Re: usb persistence

Post#17 by milangru » 12 Apr 2015, 21:44

tome wrote:Your porteus.cfg looks correct. What is your file-system on sdb1?
fat32

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

Re: usb persistence

Post#18 by francois » 13 Apr 2015, 01:52

Just change /proteussave.dat for /porteus/proteussave.dat. :)
Voltaire: Le mieux est l'ennemi du bien.

milangru
White ninja
White ninja
Posts: 12
Joined: 11 Apr 2015, 17:24
Distribution: Porteus KDE
Location: Novi Sad

Re: usb persistence

Post#19 by milangru » 13 Apr 2015, 10:40

Still havent sucseed

on boot shows among all

change cheatcode not found


File system onUSB, I have formated it to FAT32 but linux shows

Code: Select all

root@porteus:~# blkid
/dev/sdb1: UUID="A83A-9900" TYPE="vfat" 

root@porteus:~# 
Created porteussave.dat on /mnt/sdb1/porteus/porteussave.dat

on /mnt/sdb1/boot/syslinux/porteus.cfg

Code: Select all

PROMPT 0
TIMEOUT 90
UI vesamenu.c32
DEFAULT XFCE
MENU BACKGROUND porteus.png
MENU TITLE Porteus-3.1 64bit

MENU WIDTH 30
MENU MARGIN 2
MENU ROWS 10
MENU HELPMSGROW 17
MENU TIMEOUTROW 28
MENU TABMSGROW 15
MENU CMDLINEROW 22
MENU HSHIFT 4
MENU VSHIFT 5

	menu color screen	37;40      #00000000 #00000000 none
	menu color border	30;44      #00000000 #00000000 none
	menu color title	1;36;44    #ffF6FF00 #30003f07 none
	menu color unsel	37;44      #ffffffff #00000000 none
	menu color hotkey	1;37;44    #ff8037b7 #00000000 none
	menu color sel		7;37;40    #ff111B78 #003f7fbf none
	menu color hotsel	1;7;37;40  #ffaf67f7 #003f7fbf none
	menu color scrollbar	30;44      #00000000 #00000000 none

	menu color tabmsg	31;40      #ffB6F538 #00000000 none
	menu color cmdmark	1;36;40    #ffff0000 #00000000 none
	menu color cmdline	37;40      #ffffffff #ff000000 none
	menu color pwdborder	30;47      #ffff0000 #00000000 std
	menu color pwdheader	31;47      #ffff0000 #00000000 std
	menu color pwdentry	30;47      #ffff0000 #00000000 std
	menu color timeout_msg	37;40      #ff809aef #00000000 none
	menu color timeout	1;37;40    #ffb72f9f #00000000 none
	menu color help		37;40      #ffD5F538 #00000000 none
	menu color msg07	37;40      #90ffffff #00000000 std


LABEL XFCE
MENU LABEL Graphics mode (XFCE)
KERNEL vmlinuz
APPEND initrd=initrd.xz timezone=Europe/Belgrade changes=/porteus/proteussave.dat
TEXT HELP
    Run Porteus the best way we can.
    Try to autoconfigure graphics
    card and use the maximum
    allowed resolution
ENDTEXT

LABEL fresh
MENU LABEL Always Fresh
KERNEL vmlinuz
APPEND initrd=initrd.xz  timezone=Europe/Belgrade nomagic base_only norootcopy
TEXT HELP
    Normally Porteus saves all changes
    to the /porteus/changes/ directory
    on the boot media (if writable)
    and restores them next boot.
    Use this option to start a fresh
    system, changes are not read from
    or written to any device
ENDTEXT

LABEL copy2ram
MENU LABEL Copy To RAM
KERNEL vmlinuz
APPEND initrd=initrd.xz timezone=Europe/Belgrade copy2ram
TEXT HELP
    Run Porteus the same as above,
    but first copy all data to RAM
    to get a huge speed increase
    (needs >768MB)
ENDTEXT

LABEL text
MENU LABEL Text mode
KERNEL vmlinuz
APPEND initrd=initrd.xz 3
TEXT HELP
    Run Porteus in text mode and
    start the command prompt only
ENDTEXT

LABEL pxe-boot
MENU LABEL Porteus as PXE server
KERNEL vmlinuz
APPEND initrd=initrd.xz pxe
TEXT HELP
    Run Porteus as usual, but also
    initialize a PXE server.
    This will allow you to boot Porteus
    on other computers over a network
ENDTEXT

MENU SEPARATOR

LABEL plop
MENU LABEL PLoP BootManager
KERNEL plpbt
TEXT HELP
    Run the plop boot manager.
    This utility provides handy
    boot-USB options for machines
    with vintage/defective BIOS
ENDTEXT

LABEL hd
MENU LABEL Boot from the first hd
COM32 chain.c32
APPEND hd0 1
TEXT HELP
    Don't start Porteus at all, but
    rather run any operating system
    installed on the first partition
    of the hard drive
ENDTEXT
Savefile manager-recover option and recover it!
Savefile-recovery.log

Code: Select all

Phase 1 - find and verify superblock...
Cannot get host filesystem geometry.
Repair may fail if there is a sector size mismatch between
the image and the host filesystem.
Phase 2 - using internal log
        - zero log...
        - scan filesystem freespace and inode maps...
        - found root inode chunk
Phase 3 - for each AG...
        - scan and clear agi unlinked lists...
        - process known inodes and perform inode discovery...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
        - process newly discovered inodes...
Phase 4 - check for duplicate blocks...
        - setting up duplicate extent list...
        - check for inodes claiming duplicate blocks...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
Phase 5 - rebuild AG headers and trees...
        - reset superblock...
Phase 6 - check inode connectivity...
        - resetting contents of realtime bitmap and summary inodes
        - traversing filesystem ...
        - traversal finished ...
        - moving disconnected inodes to lost+found ...
Phase 7 - verify and correct link counts...
done
Still not working, but like it very much and ready to spend some more time to fix it :(

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

Re: usb persistence

Post#20 by donald » 13 Apr 2015, 11:51

@ milangru
you write
"Created porteussave.dat on /mnt/sdb1/porteus/porteussave.dat"
and in your porteus.cfg
"APPEND initrd=initrd.xz timezone=Europe/Belgrade changes=/porteus /proteussave.dat"
That does not match.

milangru
White ninja
White ninja
Posts: 12
Joined: 11 Apr 2015, 17:24
Distribution: Porteus KDE
Location: Novi Sad

Re: usb persistence

Post#21 by milangru » 13 Apr 2015, 13:51

Finally done it with save modul changes. stop use cheatcodes

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

Re: usb persistence

Post#22 by francois » 14 Apr 2015, 03:20

milangru wrote:So I have done this create proteussave.dat on /mnt/sdb1/porteus/proteussave.dat
On proteus.cfg have this

Code: Select all

LABEL XFCE
MENU LABEL Graphics mode (XFCE)
KERNEL vmlinuz
APPEND initrd=initrd.xz timezone=Europe/Belgrade from=UUID:8291-4946  changes=/porteussave.dat
TEXT HELP
    Run Porteus the best way we can.
    Try to autoconfigure graphics
    card and use the maximum
    allowed resolution
ENDTEXT
Stil not working. I would like to have saved changes when EXIT Porteus , can someone please help me?
Just change /proteussave.dat for /porteus/proteussave.dat
Voltaire: Le mieux est l'ennemi du bien.

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

Re: usb persistence

Post#23 by donald » 14 Apr 2015, 08:06

@ milangru
You constantly change from "proteus" to "porteus" and vice versa.
I'm simply not able to follow.
My (last) suggestion:
Format your usb-flash with a Linux Filesystem (e.g. ext2), install Porteus anew,
and you have persistent changes "out of the box".

milangru
White ninja
White ninja
Posts: 12
Joined: 11 Apr 2015, 17:24
Distribution: Porteus KDE
Location: Novi Sad

Re: usb persistence

Post#24 by milangru » 14 Apr 2015, 10:19

donald wrote:@ milangru
You constantly change from "proteus" to "porteus" and vice versa.
I'm simply not able to follow.
My (last) suggestion:
Format your usb-flash with a Linux Filesystem (e.g. ext2), install Porteus anew,
and you have persistent changes "out of the box".
I know that but then my USB cant be read/write from Windows, can it be done with 2 partitions on one usb, one partition with Fat file system and other with ext4 with Porteus on it?

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

Re: usb persistence

Post#25 by donald » 14 Apr 2015, 21:23

yes, but the FAT partition must be the first one.

milangru
White ninja
White ninja
Posts: 12
Joined: 11 Apr 2015, 17:24
Distribution: Porteus KDE
Location: Novi Sad

Re: usb persistence

Post#26 by milangru » 15 Apr 2015, 17:01

donald wrote:yes, but the FAT partition must be the first one.
Can you tell me how, I have tried it but no sucsess, first partition FAT32 3GB and second 700Mb ext4 with Porteus on it but it don't boot. I use on HD windiws 8 and must use EFI mode to boot from the USB. I can boot from usb with yust one partition and Poretesu on it ,but can't with 2 partitions even if the first one is FAT and second one ext with Porteus on it. Can someone help me, please?

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

Re: usb persistence

Post#27 by donald » 15 Apr 2015, 21:05

I'm sorry, I have no experience / hardware with UEFI.

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

Re: usb persistence

Post#28 by francois » 15 Apr 2015, 23:06

@milangru:
uefi is a special porteus installation please Google porteus uefi install.
Voltaire: Le mieux est l'ennemi du bien.

neko
Contributor
Contributor
Posts: 910
Joined: 09 Feb 2013, 09:55
Distribution: APorteus-FVWM-ja-x86_64.iso
Location: japan

Re: usb persistence

Post#29 by neko » 02 Aug 2015, 08:17

@milangru
I made the USB that has 2 partitions, for EFI BOOT and for PERSISTENT DATA.
And then UP.Porteus-XFCE-v3.1-i486.iso was booted from this USB on EFI PC
and had a persistent data.

I am glad if this report might be usefull for you.


note:
1. My EFI PC (LIVA) doesn't boot from the original Porteus kernel.
Therefor I used UP.Porteus-XFCE-v3.1-i486.iso.
If your EFI PC is OK for the original Porteus kernel,
original Porteus-XFCE-v3.1-i486.iso can be used.

2. USB was assigned to /dev/sdb in this test.
USB capacity was 3.74G.
The first partition was FAT and 181M.
The second partition was EXT4 and 3.56G.

3. A persistent data size was set to 200M.

4. You can check how to set USB by
/usr/share/live-usb/bin/live-usb-efi shell file of live-usb-3.1-noarch-3.xzm

============================================================================
Preparation:

[ ISO ]
Porteus-XFCE-v3.1-i486.iso

[ Tool ]
live-usb-3.1-noarch-4.xzm
http://www.mediafire.com/download/8u6g8 ... arch-4.xzm
upkernel-3.18.19-noarch-1.xzm
http://www.mediafire.com/download/hqa1m ... arch-1.xzm

============================================================================
Procedure:

[ From Terminal ]
----------------------------------------------------------------------------
% su
# ls -1
Porteus-XFCE-v3.1-i486.iso
live-usb-3.1-noarch-4.xzm
upkernel-3.18.19-noarch-1.xzm
# activate live-usb-3.1-noarch-4.xzm
# activate upkernel-3.18.19-noarch-1.xzm
# upkernel Porteus-XFCE-v3.1-i486.iso
# ls -1
Porteus-XFCE-v3.1-i486.iso
UP.Porteus-XFCE-v3.1-i486.iso
UP.Porteus-XFCE-v3.1-i486.iso.md5
live-usb-3.1-noarch-4.xzm
upkernel-3.18.19-noarch-1.xzm
# deactivate upkernel-3.18.19-noarch-1.xzm
----------------------------------------------------------------------------

[ GUI ]
execute live-usb
ISO = UP.Porteus-XFCE-v3.1-i486.iso
USB = inserted and detected USB (/dev/sdb)
Partition type = EFI
Partition option = default

[ From Terminal ]
----------------------------------------------------------------------------
# deactivate live-usb-3.1-noarch-4.xzm
# mount /dev/sdb1 /mnt/sdb1
# 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
----------------------------------------------------------------------------

[ Edit /mnt/sdb1/EFI/boot/grub.cfg by root ]
----------------------------------------------------------------------------
set prefix=/EFI/boot/
set default="0"
if loadfont $prefix/unicode.pf2; then
set gfxmode=auto
insmod efi_gop
insmod efi_uga
insmod gfxterm
terminal_output gfxterm
fi
set timeout="30"
set hidden_timeout_quiet=false

if background_image $prefix/img_1006.png; then
set color_normal=black/black
set menu_color_highlight=white/light-gray
else
set color_normal=cyan/blue
set color_highlight=white/blue
fi


menuentry "fresh mode" {
search --set -f /boot/syslinux/vmlinuz
linux /boot/syslinux/vmlinuz changes=/persistent/porteus.persist
initrd /boot/syslinux/initrd.xz
}
menuentry "ram mode" {
search --set -f /boot/syslinux/vmlinuz
linux /boot/syslinux/vmlinuz copy2ram changes=EXIT:/persistent/porteus.persist
initrd /boot/syslinux/initrd.xz
}
menuentry "Text mode" {
search --set -f /boot/syslinux/vmlinuz
linux /boot/syslinux/vmlinuz 3
initrd /boot/syslinux/initrd.xz
}
----------------------------------------------------------------------------

============================================================================

Thanks.

Post Reply