You are not logged in.

#1 2012-04-22 01:06:47

nip
Member
Registered: 2012-04-22
Posts: 1

Install on SDCard/USB stick, toggle read-only filesystem - possible?

This is something I thought about while installing Arch on an SD card earlier. You know these small switches on some SD cards that make them read-only, right?

Would it be possible to have a setup where Archlinux is installed on a rewritable storage device like an USB Stick or an SD card, where one mode of operation would be to use it like a regular, persisting Arch install (with writeable filesystem). The second mode would be to use it similar to a Live CD, not persisting any data on the storage device and using RAM instead (mounting the root filesystem as read-only).

Basically, you could boot into regular mode (perhaps by choosing a seperate entry in GRUB), change configurations, update packages, etc. Then you reboot into read-only mode and use it as a Live CD with any changes to the filesystem stored only in RAM. This could be combined with system encryption to provide a secure and portable Arch installation that can be kept up-to date and simply by rebooting, you have a protected, volatile environment similar to a Live CD.

Is something like that possible? Has it been done already?

Offline

#2 2012-04-22 02:29:48

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Install on SDCard/USB stick, toggle read-only filesystem - possible?

There are such systems available.  One such system is CTKARCH which can be run in a flash drive but is an older kernel and not upgraded to the latest Linux.

Perhaps you would be interested in my project which is raid0 grub2 bootable which runs in Compact Flash at 180mb's read speed and 25mb/s write speed.  It isn/t read only but has only boot,swap and root partitions with the raid0 being the root partition.

I do not think there is a system which is read-only as you describe it but what do I know!

As to running in ram, practically it isn't any better than normal running in arch which definitely runs mostly in ram, especially if you have 2GB or more ram.

My raid0 system is described in Installation forum and boots nicely in arch in seven seconds as last measurement revealed.

Do a lot of reading to research what is out there on the net.

Good hunting!


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#3 2012-04-22 07:37:25

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: Install on SDCard/USB stick, toggle read-only filesystem - possible?

Too much hassle rebooting all the time. Just use a VM for your browser, since that's where most viruses/malware come from anyway. I don't get people who install operating systems on USB sticks. Common sense tells me that it's not going to be their primary OS, with the USB drive sticking out like that. If you use swap and have /var mounted on it, it can also impact the drive's life, as all flash storage have a limited number of writes.

Start with your why. Is it to impress someone? For kicks? Why? I just don't see it in a very practical usage scenario. If you need bare-metal hardware access, where a VM just doesn't cut it, I guess you can boot a customized LiveCD from RAM, which would be even BETTER than Read-Only. Because once the ISO is loaded and you get to the bootloader menu, you can effectively remove the USB stick. The ISO is now loaded in RAM. The system hasn't even started yet and there are absolutely NO storage mount points for which a potential Linux virus to propagate. And to update the ISO you just run the Archboot scripts again.

But again, why? When you can so easily restore a VM snapshot and start "fresh".


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#4 2012-04-22 07:39:17

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: Install on SDCard/USB stick, toggle read-only filesystem - possible?

Here's what I mean by using a VM: http://www.tomshardware.com/reviews/joa … 356-6.html

Read the "Alan: What do you do for your regular systems?" part. But you can also read the whole article. Some interesting points are brought up.


PS: Welcome to the forums.

Last edited by DSpider (2012-04-22 07:40:30)


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#5 2012-04-22 14:54:20

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Install on SDCard/USB stick, toggle read-only filesystem - possible?

Comment on the "why" for Flash Device....quiet operation, less power required, faster performance and reduced size.

Faster boot time is also possible with raid applied.

As previously stated, running all in ram doesn't provide any performance improvement if the system has at least 2GB of ram.  Thus the use of swap is not required with that much ram.

This principle also applies to Flash Devices which have algortithms controlling the writes across the entire card capacity such that larger capacity increases lifetime expectancy.

Copy- on- write is also proposed for flash devices which reduces the process steps for writing to flash.

In my experience with running-in-ram with CTKArch "live" system, I found not much to endorse using that mode.  A negative of good proportion is the copy-to-ram loading time , which cannot be avoided.

Basically, faster ram is the best approach for performance enhancement in all systems.

Thus, there are herein some reasons for using flash in an arch booting system whether "live" or conventional or raid based.

My raid0 bootable system was outlined in previous post and am using it now.  It is not a USB connected bus arrangement which inherently limits performance.

I find Compact Flash in UDMA or true IDE mode to provide good performance speed of 90mb/s read and 25mb/s write to be a fine alternative to hard drives.  In raid0 read speed is doubled.  Good reason for flash devices but not in usb mode.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

Board footer

Powered by FluxBB