[arch-general] creating an archlinux usb key with persistence
Hi, Are there instructions for creating an archlinux usb key with persistence somewhere? I want to use my archlinux usb key as a diagnostic tool, and sometimes it is helpful to save files to it for later review. Any info would be appreciated. BTW: I am planning on using a 64gb usb key for this endeavor.
On Thu, Mar 13, 2014 at 6:09 AM, Don Raikes <DON.RAIKES@oracle.com> wrote:
Hi,
Are there instructions for creating an archlinux usb key with persistence somewhere?
I want to use my archlinux usb key as a diagnostic tool, and sometimes it is helpful to save files to it for later review.
Any info would be appreciated.
BTW: I am planning on using a 64gb usb key for this endeavor.
There is https://wiki.archlinux.org/index.php/Installing_Arch_Linux_on_a_USB_key Do you mean a liveUSB?
On 13 March 2014 11:09, Don Raikes <DON.RAIKES@oracle.com> wrote:
Hi,
Are there instructions for creating an archlinux usb key with persistence somewhere?
I want to use my archlinux usb key as a diagnostic tool, and sometimes it is helpful to save files to it for later review.
Any info would be appreciated.
BTW: I am planning on using a 64gb usb key for this endeavor.
As far as I am aware, there is no official documentation, support or tool for this. I've also had a frugal install on my personal TODO for several years now but never got around to it. [1] Support for persistence needs to be built into the image, but I may be wrong; persistence in most cases is simply a virtual disk image overlay (it is overlaid on top of the primary booting system) that only saves changes and nothing else. I had an ext2-formatted second-partition Arch install for a while, but I realized I didn't like that. Now I simply have a SysResCD that I managed to shove into a single directory ".ufdboot", hidden in Linux, Mac, and Windows (by setting attrib +h from cmd or wine). Try a boot helper such as Universal USB Installer; they say it gives persistence to "any" distribution (I'm unsure how). You may also be able to find a ready-made third-party image. Simply do a Google search for "arch linux live with persistence" or similar. In any case, I wouldn't suggest having one of our official ISOs redone with persistence without more customization. They're bare minimal system images, and the changes you apply are surely to increase by several gigabytes (and the overlay may take even more space). [1] https://wiki.archlinux.org/index.php/User:Schivmeister/ArchLinuxUFD -- GPG/PGP ID: C0711BF1
Salutations, While I don't know of any specific instructions on the Arch wiki, you can install Arch Linux onto a usb stick like a regular {H,S}DD. In my case, I made three partitions. The first was an NTFS partition for using the usb stick as a data transferring device; the second was a FAT32 boot partition (for EFI and Syslinux booting); the third was a BTRFS root partition (with transparent LZO compression enabled to reduce read/write). In addition, I use a script to place certain directories (mostly $HOME directories in my case) in a tmpfs partition (I just link them to /tmp) to decrease the effect of USB writes on the system. My script syncs the tmpfs directores to disk every 5 minutes. Since it's a full Arch Linux system, it upgrades and evolves like any other Arch system. Regards, Mark On Thu, Mar 13, 2014 at 3:40 AM, Rashif Ray Rahman <schiv@archlinux.org>wrote:
Hi,
Are there instructions for creating an archlinux usb key with
On 13 March 2014 11:09, Don Raikes <DON.RAIKES@oracle.com> wrote: persistence somewhere?
I want to use my archlinux usb key as a diagnostic tool, and sometimes
it is helpful to save files to it for later review.
Any info would be appreciated.
BTW: I am planning on using a 64gb usb key for this endeavor.
As far as I am aware, there is no official documentation, support or tool for this. I've also had a frugal install on my personal TODO for several years now but never got around to it. [1]
Support for persistence needs to be built into the image, but I may be wrong; persistence in most cases is simply a virtual disk image overlay (it is overlaid on top of the primary booting system) that only saves changes and nothing else.
I had an ext2-formatted second-partition Arch install for a while, but I realized I didn't like that. Now I simply have a SysResCD that I managed to shove into a single directory ".ufdboot", hidden in Linux, Mac, and Windows (by setting attrib +h from cmd or wine).
Try a boot helper such as Universal USB Installer; they say it gives persistence to "any" distribution (I'm unsure how). You may also be able to find a ready-made third-party image. Simply do a Google search for "arch linux live with persistence" or similar.
In any case, I wouldn't suggest having one of our official ISOs redone with persistence without more customization. They're bare minimal system images, and the changes you apply are surely to increase by several gigabytes (and the overlay may take even more space).
[1] https://wiki.archlinux.org/index.php/User:Schivmeister/ArchLinuxUFD
-- GPG/PGP ID: C0711BF1
On 03/13/14 at 03:59am, Mark Lee wrote:
While I don't know of any specific instructions on the Arch wiki, you can install Arch Linux onto a usb stick like a regular {H,S}DD. In my case, I made three partitions. The first was an NTFS partition for using the usb stick as a data transferring device; the second was a FAT32 boot partition (for EFI and Syslinux booting); the third was a BTRFS root partition (with transparent LZO compression enabled to reduce read/write). In addition, I use a script to place certain directories (mostly $HOME directories in my case) in a tmpfs partition (I just link them to /tmp) to decrease the effect of USB writes on the system. My script syncs the tmpfs directores to disk every 5 minutes. Since it's a full Arch Linux system, it upgrades and evolves like any other Arch system.
That sounds amazing, and I want one :) If you have a fuller blog post somewhere, or that script is available, I'm interested. Manolo
Salutations, If you kind of just follow my message you'll understand how. It really goes exactly like I said. I'll work on writing a script for generating one, possibly have a rough draft sometime tomorrow. Regards, Mark On Thu, Mar 13, 2014 at 6:38 AM, Manolo Martínez <manolo@austrohungaro.com>wrote:
While I don't know of any specific instructions on the Arch wiki, you can install Arch Linux onto a usb stick like a regular {H,S}DD. In my case, I made three partitions. The first was an NTFS partition for using the usb stick as a data transferring device; the second was a FAT32 boot
On 03/13/14 at 03:59am, Mark Lee wrote: partition
(for EFI and Syslinux booting); the third was a BTRFS root partition (with transparent LZO compression enabled to reduce read/write). In addition, I use a script to place certain directories (mostly $HOME directories in my case) in a tmpfs partition (I just link them to /tmp) to decrease the effect of USB writes on the system. My script syncs the tmpfs directores to disk every 5 minutes. Since it's a full Arch Linux system, it upgrades and evolves like any other Arch system.
That sounds amazing, and I want one :) If you have a fuller blog post somewhere, or that script is available, I'm interested.
Manolo
I agree! It sounds like just what I need. -----Original Message----- From: Manolo Martínez [mailto:manolo@austrohungaro.com] Sent: Thursday, March 13, 2014 3:39 AM To: General Discussion about Arch Linux Subject: Re: [arch-general] creating an archlinux usb key with persistence On 03/13/14 at 03:59am, Mark Lee wrote:
While I don't know of any specific instructions on the Arch wiki, you can install Arch Linux onto a usb stick like a regular {H,S}DD. In my case, I made three partitions. The first was an NTFS partition for using the usb stick as a data transferring device; the second was a FAT32 boot partition (for EFI and Syslinux booting); the third was a BTRFS root partition (with transparent LZO compression enabled to reduce read/write). In addition, I use a script to place certain directories (mostly $HOME directories in my case) in a tmpfs partition (I just link them to /tmp) to decrease the effect of USB writes on the system. My script syncs the tmpfs directores to disk every 5 minutes. Since it's a full Arch Linux system, it upgrades and evolves like any other Arch system.
That sounds amazing, and I want one :) If you have a fuller blog post somewhere, or that script is available, I'm interested. Manolo
On Wed, 12 Mar 2014 22:09:14 -0700 (PDT) Don Raikes <DON.RAIKES@ORACLE.COM> wrote:
Hi,
Are there instructions for creating an archlinux usb key with persistence somewhere?
I want to use my archlinux usb key as a diagnostic tool, and sometimes it is helpful to save files to it for later review.
Any info would be appreciated.
BTW: I am planning on using a 64gb usb key for this endeavor.
Just create a extra partition on the usb stick and format it as f2fs or whatever. There you go, persistent storage.
Salutations, Do you know how stable F2FS is (the Phoronix benchmarks don't tell us anything about data permanence)? Regards, Mark On Thu, Mar 13, 2014 at 8:04 AM, Øyvind Heggstad <mrelendig@har-ikkje.net>wrote:
On Wed, 12 Mar 2014 22:09:14 -0700 (PDT) Don Raikes <DON.RAIKES@ORACLE.COM> wrote:
Hi,
Are there instructions for creating an archlinux usb key with persistence somewhere?
I want to use my archlinux usb key as a diagnostic tool, and sometimes it is helpful to save files to it for later review.
Any info would be appreciated.
BTW: I am planning on using a 64gb usb key for this endeavor.
Just create a extra partition on the usb stick and format it as f2fs or whatever. There you go, persistent storage.
On Mar 13, 2014 2:56 PM, "Mark Lee" <mark@markelee.com> wrote:
Salutations,
Do you know how stable F2FS is (the Phoronix benchmarks don't tell us anything about data permanence)?
Regards, Mark
A quick search for 'samsung phone data loss' comes up only with undeleting methods and a virus. Since Samsung uses F2FS for some time on their phones, I'd expect data permanence will not be much of a problem. But after using btrfs on an ssd for a year and some, I'd suggest that also, but take care not to fill the disk up too much, as btrfs ondemand optimization will slow down your machine with low free space. - -Oliver Temlin
On 13-03-2014 12:04, Øyvind Heggstad wrote:
Any info would be appreciated.
BTW: I am planning on using a 64gb usb key for this endeavor.
Just create a extra partition on the usb stick and format it as f2fs or whatever. There you go, persistent storage.
I would say go with btrfs in that case. I've tried f2fs for a while and in my opinion it still needs to mature a bit more, right now I'm giving btrfs a go and so far I'm happy. My setup right now is this: 32GB usb3 drive |-sda1 (4G) - fat32 |-sda1 (256M) - ext4 /boot |-sda2 (rest of drive) - luks - btrfs - subvolumes for root and home -- Mauro Santos
Salutations, Remember that fat32 has a 4GB file size limitation (it doesn't effect Mauro Santos, cause his partition is 4GB). In addition I suggest using fat32 for /boot since it can also work on UEFI systems (minimum partition size is 100mb). I also use luks+btrfs (I use dmcrypt). Regards, Mark On Thu, Mar 13, 2014 at 9:58 AM, Mauro Santos <registo.mailling@gmail.com>wrote:
On 13-03-2014 12:04, Øyvind Heggstad wrote:
Any info would be appreciated.
BTW: I am planning on using a 64gb usb key for this endeavor.
Just create a extra partition on the usb stick and format it as f2fs or whatever. There you go, persistent storage.
I would say go with btrfs in that case. I've tried f2fs for a while and in my opinion it still needs to mature a bit more, right now I'm giving btrfs a go and so far I'm happy.
My setup right now is this:
32GB usb3 drive |-sda1 (4G) - fat32 |-sda1 (256M) - ext4 /boot |-sda2 (rest of drive) - luks - btrfs - subvolumes for root and home
-- Mauro Santos
On 13-03-2014 14:01, Mark Lee wrote:
Salutations,
Remember that fat32 has a 4GB file size limitation (it doesn't effect Mauro Santos, cause his partition is 4GB). In addition I suggest using fat32 for /boot since it can also work on UEFI systems (minimum partition size is 100mb). I also use luks+btrfs (I use dmcrypt).
Regards, Mark
Litte tip: this list prefers bottom posting ;) Yes I know fat32 has a 4GB file size limit, hence the 4GB partition ;) On the other hand I also didn't want it to eat up too much space since it will be almost always empty. Regarding efi you make a good point, I haven't thought of it because currently I don't have any machine that supports efi. -- Mauro Santos
Sounds likea good setup. What tool are you using for partitioning? I don't remember luks/btrfs as an option in fdisk, admittedly I am coming from a debian perspective just switching to arch to try it out. -----Original Message----- From: Mauro Santos [mailto:registo.mailling@gmail.com] Sent: Thursday, March 13, 2014 6:58 AM To: arch-general@archlinux.org Subject: Re: [arch-general] creating an archlinux usb key with persistence On 13-03-2014 12:04, Øyvind Heggstad wrote:
Any info would be appreciated.
BTW: I am planning on using a 64gb usb key for this endeavor.
Just create a extra partition on the usb stick and format it as f2fs or whatever. There you go, persistent storage.
I would say go with btrfs in that case. I've tried f2fs for a while and in my opinion it still needs to mature a bit more, right now I'm giving btrfs a go and so far I'm happy. My setup right now is this: 32GB usb3 drive |-sda1 (4G) - fat32 |-sda1 (256M) - ext4 /boot |-sda2 (rest of drive) - luks - btrfs - subvolumes for root and home -- Mauro Santos
My setup right now is this:
32GB usb3 drive |-sda1 (4G) - fat32 |-sda1 (256M) - ext4 /boot |-sda2 (rest of drive) - luks - btrfs - subvolumes for root and home
Sounds likea good setup.
What tool are you using for partitioning? I don't remember luks/btrfs as an option in fdisk, admittedly I am coming from a debian perspective just switching to arch to try it out. Sounds likea good setup.
Just make it whatever you want, it doesn't really matter in linux, where identification goes by magic numbers, not such things as this and extensions. You can easily follow the wiki with setting up dm-crypt/LUKS and btrfs subvolumes. Also, please append mesaages to the bottom, as to keep messages in a chronological order. --Oliver Temlin
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 03/13/2014 01:20 PM, Temlin Olivér wrote:
My setup right now is this:
32GB usb3 drive |-sda1 (4G) - fat32 |-sda1 (256M) - ext4 /boot |-sda2 (rest of drive) - luks - btrfs - subvolumes for root and home
Sounds likea good setup.
What tool are you using for partitioning? I don't remember luks/btrfs as an option in fdisk, admittedly I am coming from a debian perspective just switching to arch to try it out. Sounds likea good setup.
Just make it whatever you want, it doesn't really matter in linux, where identification goes by magic numbers, not such things as this and extensions. You can easily follow the wiki with setting up dm-crypt/LUKS and btrfs subvolumes. Also, please append mesaages to the bottom, as to keep messages in a chronological order.
--Oliver Temlin
Salutations, I personally used gptfdisk, but gparted also does it. When it comes to to creating a dm-crypt/LUKS partition, one needs to generate an unformatted partition first and then encrypt it with dm-crypt and create the file system in /dev/mapper/ (see <https://wiki.archlinux.org/index.php/Dm-crypt/Drive_Preparation>). Some quick and dirty commands; # partition=</dev/sd* id of partition>; ## set the partition to format # cryptname=<chosen name of luks container>; ## set the name of the decrypted container # cryptsetup -t luksFormat $partition; ## create luks/dm-crypt container # cryptsetup open $partition $cryptname; ## open the luks/dm-crypt container # mkfs.btrfs /dev/mapper/$cryptname; ## format container with btrfs # mount -o defaults,compress=lzo /dev/mapper/$cryptname <mount point>; ## mount container with compression Regards, Mark -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iF4EAREIAAYFAlMiNb8ACgkQZ/Z80n6+J/ZwQgD/TV2GtbeJHVBtqVnYeIM2vjfR MwsPXi3N2smxAVBloPMA/0OOgdw5QLg5bJdaf+5hvoz+LTESv3xcpGDzjvbCM+sc =ghMp -----END PGP SIGNATURE-----
participants (8)
-
Don Raikes
-
Karol Blazewicz
-
Manolo Martínez
-
Mark Lee
-
Mauro Santos
-
Rashif Ray Rahman
-
Temlin Olivér
-
Øyvind Heggstad