UUID and LABEL support for "changes" and "from_dev"

New features which should be implemented in Porteus; suggestions are welcome. All questions or problems with testing releases (alpha, beta, or rc) should go in their relevant thread here, rather than the Bug Reports section.
Post Reply
y1b
Ronin
Ronin
Posts: 1
Joined: 05 Jun 2011, 15:49
Location: /dev/sdb2

UUID and LABEL support for "changes" and "from_dev"

Post#1 by y1b » 06 Jun 2011, 00:19

Hello,

Such a feature can be useful in the cases when porteus is installed on a USB memory stick and changes is configured on the second partition.
It can be used i.e. changes=/dev/sdb2 cheatcode but it shall fail if the system has more than one (or none) harddisks - the USB memory stick does not get sdb.

Using changes=UUID:xxxx-xxx-xxx... or changes=LABEL:porteus-changes cheat code will select the correct device.

from_dev=UUID:xxx and from_dev=LABEL:porteusonstick address similar issue when porteus is booted from USB stick but select i.e. the CDROM for porteus data.

I have created a patch for linuxrc that implements these features.
I can be downloaded from there.
I would be happy if the patch is included in the next release.

BTW, it seams the changes partition is not unmounted correctly on shutting down - the file system (ext2) remains "dirty" or, in case of EXT3 the journal has to be rebuilt on the next mount. The problem appears both when changes=/dev/sdb2 and changes=UUID:xxx is used. Is that a bug or I am missing something?

User avatar
82issa
DOC Team
DOC Team
Posts: 127
Joined: 13 Apr 2011, 17:24
Location: USA, NC

Re: UUID and LABEL support for "changes" and "from_dev"

Post#2 by 82issa » 06 Jun 2011, 10:32

I like this and hope they implement this on final release. This can be very useful. I am not sure on the bug issue, I'll mess arround with it a bit later on and see if I get similar results.
Sorry guys... I got to go. My girlfriend just casted "get your dirty ass into the shower" on me.
Oh and here is some naked grandpa pictures too.

User avatar
fanthom
Site Admin
Site Admin
Posts: 4623
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: UUID and LABEL support for "changes" and "from_dev"

Post#3 by fanthom » 08 Jun 2011, 09:07

@y1b
Will try to implement this feature for 1.0
thanks for suggestion and the patch.

Posted after 1 day 14 hours 53 minutes 59 seconds:
EDIT:\\
done :)
this is how it works - all cheatcodes which contains supports full paths (from_dev, from_iso, changes, extramod, rootcopy) can be modified to use LABEL: and UUID: instead of /dev/sdXy (eventually /mnt/sdXy) i'll show it on examples:
1) changes=/dev/sda5/changes
changes=LABEL:Porteus/changes

2) from_dev=/dev/sdb4
from_dev=UUID:BAF0DA26F0D9E8A1

3) extramod=/mnt/sdc2/porteus_modules/FINAL
extramod=UUID:cdecc103-2224-45c7-bced-5ca62d6bb505/porteus_modules/FINAL

etc...
be aware that all names are case sensitive:
you can't use Uuid: - must be UUID:
you cant use LABEL:PORTEUS when partition is labelled as Porteus
you cant use UUID:9e5c60085c5Fd99b when uuid is 9E5C60085C5FD99B

the best idea to find right names for LABELS/UUID's is to start porteus and then run 'blkid' command. here is sample output:

Code: Select all

/dev/sda1: LABEL="System" UUID="BAF0DA26F0D9E8A1" TYPE="ntfs"
/dev/sda3: UUID="cdecc103-2224-45c7-bced-5ca62d6bb505" TYPE="ext4"
/dev/sda5: UUID="1efa1b6a-c8c5-45a7-b828-d8326049a956" TYPE="ext4"
/dev/sda6: UUID="f480ad11-cfb7-4060-9cc7-dcd3ff113bdd" TYPE="swap"
/dev/sda7: UUID="f2ff3fb8-be28-4923-b599-ad833d536332" TYPE="ext4"
/dev/sda8: UUID="a7137516-f535-4e59-8087-49c18c32a75c" TYPE="ext4"
/dev/sda9: LABEL="Filmy" UUID="CC2C3C312C3C18C2" TYPE="ntfs"
/dev/sda10: LABEL="Programy" UUID="B634558F34555389" TYPE="ntfs"
/dev/sda11: LABEL="Muza" UUID="9E5C60085C5FD99B" TYPE="ntfs"
Why to use UUID's and LABEL's instead on /dev/sdXy?
because UUID is an unique hash for every partition and you can be 100% sure that porteus will find the right one during boot despite of PC configuration.
make sure to use unique LABEL names for your partitions as linuxrc may get confused when find two with same name (ie: SYSTEM)

Cheers
Please add [Solved] to your thread title if the solution was found.

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

Re: UUID and LABEL support for "changes" and "from_dev"

Post#4 by brokenman » 08 Jun 2011, 09:54

Excellent improvement!!

Great suggestion y1b. I think a GUI to change porteus.cfg may be a good idea. When i merge some items in the system menu i will attend to this, and it could perhaps be added to the Porteus Assistant Wizard.
How do i become super user?
Wear your underpants on the outside and put on a cape.

Post Reply