Installing Trisquel on a USB Key

26 respostas [Última entrada]
Bob Vegan
Desconectado
Joined: 01/01/2021

Greetings!
I am about to install Trisquel on a USB flash drive.
What filesystem should I use: ext4 without journaling, or something else?
If I use ext4 without journaling, will I experience negative side-effects?
Anything else I need to be aware of?

Magic Banana

I am a member!

Desconectado
Joined: 07/24/2010

USB Flash drives do not support many write cycles. That is certainly the (good) reason why you want ext4 without the journal. The downside of not having a journal is that a sudden shutdown of the system (for instance a power cut) is more likely to lead to a problematic corruption of the filesystem, that fsck may be able to fix.

So, well, choosing ext4 without a journal is indeed a good idea but regularly backup your data and expect your flash drive to have a premature death.

nadebula.1984
Desconectado
Joined: 05/01/2018

Even the 2-bit MLC flash disks aren't durable enough (when compared with low-end, entry-level SSDs). I did wore out some of them (high-end models from Transcend).

But since SSDs are very cheap recently, why not using an external SSD to do this? WD Green SSDs are cheap enough but still fairly reliable.

Bob Vegan
Desconectado
Joined: 01/01/2021

I was not aware that SSDs are cheaper than USB flash drives. I will need to buy external SSD, but my old computer have only USB1 (old usb) ports. Will USB1 provide enough power to support external SSD drive? I am currently thinking about buying 128GB SSD USB Smartbuy S3 Drive, are there better options? What will you recommend?

nadebula.1984
Desconectado
Joined: 05/01/2018

A nice question. I've once neglected the power supply issue. For example, I picked up a used Intel S3610 1.6 TB SSD from local dark market for a quite reasonable price. However, I subsequently realized that this SSD could not be used as an external one, because the required current is 1.4 A, whereas a standard USB 3.0 port provides 0.9 A.

Normally, I'd like to suggest an M.2 version of WD Green SSD plus an M.2 to USB 3.0 converter enclosure. However, for your legacy computer, I still need some investigation.

Bob Vegan
Desconectado
Joined: 01/01/2021

The motherboard is ASUS A8N-SLI Premium, the processor is AMD Athlon XP 4000+ (x64).

Magic Banana

I am a member!

Desconectado
Joined: 07/24/2010

USB 1.0? Are you sure? USB 2.0 was released 21 years ago.

Anyway, I tend to think even an USB 2.0 interface would be the bottleneck: it only allows to transmit 60 MB/s, according to https://en.wikipedia.org/wiki/USB#2.0

Why not an 2.5" external HDD? Given the USB 2.0 interface you may feel no difference in performance, but can get 500 GB HDD, for a smaller price than that of 128 GB SSD.

Bob Vegan
Desconectado
Joined: 01/01/2021

The motherboard was manufactured in 2005, I remember it being USB 1.0, but I may be wrong.
The original idea was to have Trisquel on a portable USB drive, then I would be able to plug it in any computer and boot from USB key right into Trisquel.
The new computer is a nettop, it has a couple of USB 3.0 interfaces and 2 Display ports, nothing else. The old computer is a desktop. I thought USB would be the most versatile method to connect external drive to both machines.
2.5" external HDD? It will probably need additional power supply?

loldier
Desconectado
Joined: 02/17/2016

The USB ports should support Hi-Speed 2.0 specifications on your motherboard unless there is an add-on card that is USB 1.1.

mboard.png
Magic Banana

I am a member!

Desconectado
Joined: 07/24/2010

I have a 2.5" external HDD that is only alimented through the USB port. I believe it is the usual case nowadays, but I may be wrong.

nadebula.1984
Desconectado
Joined: 05/01/2018

Even with a USB 2.0 port, the performance of SSDs is not so bad. The maximum transfer rate of a USB 2.0 high-speed port is approximately 30 MB/s (half of 480 Mbit/s), which is still faster than many main-stream flash disks/cards. I don't see many flash disks/cards that have writing speed higher than 30 MB/s, albeit the reading speed can be much higher.

Bob Vegan
Desconectado
Joined: 01/01/2021

Well then, I will be probably buying an external HDD.

nadebula.1984
Desconectado
Joined: 05/01/2018

If you want to buy an external HDD, it's getting increasingly tricky, too. Briefly, you'll probably run into an SMR (shingled magnetic recording) disk, which is thought to be defective in design (not by design), especially NOT suitable for external use. Unfortunately, it's very hard to buy non-SMR disks nowadays.

A trick is to buy used ones from second-hand HDD vendor and install it into an enclosure (i.e. portable HDD box). Since you can see the label of the disk before deciding to buy it or not, you can first verify whether it is an SMR disk or not.

Another trick: 2.5-inch disks smaller than 500 GB (e.g. 160, 250 or 320 GB) are safe.

Ultimately, external SSDs are strongly recommended, but be sure to check its power consumption. The required current should not exceed 1.0 A.

Bob Vegan
Desconectado
Joined: 01/01/2021

WD 2Tb My Passport Black (WDBYVG0020BBK-WESN)
I am unable to find any information about this disk being SMR, or PMR. The only thing, that negative reviews are mentioning, is bundled software "WD Discovery" being spyware, but it's not required for the disk to operate and I will be reformating it under ext4 anyway. The documentation mentions it's compatible with USB 2.0, USB 3.0, USB 3.2 Gen 1.
Will this disk be the right choice?

The SSDs are being quite expensive, compared to HDDs. I'd prefer to buy an external HDD, if possible.

nadebula.1984
Desconectado
Joined: 05/01/2018

Surely it is an SMR disk, because the only non-SMR 2 TB disk (2.5 inch), namely ST2000LM003, is made by Seagate/Samsung, and is no longer manufactured for quite a long time. SMR hard disk is the worst option for external system disk, because their very poor writing performance and very high risk of data loss.

However, if you want an external HDD anyway (albeit I'm strongly against it), try to find a non-SMR model from used part vendor (e.g. local dark market). You can then buy an enclosure (box) for it.

Here is a short (and incomplete) list of non-SMR hard disk models (2.5 inch):

500 GB: Seagate ST500LM012/021, Western Digital WD5000LPVX/LPCX/LPLX, Toshiba MQ01ABF050/ACF050

1 TB: Western Digital WD10SPCX, Toshiba MQ02ABF100

Stay away from latest Seagate Barracuda/Pro series, Toshiba MQ04 series, and WD models with letter "S" in last two digits (which stands for "SMR").

Bob Vegan
Desconectado
Joined: 01/01/2021

Well, things seems to be getting complicated. I guess I will have to buy an SSD then. One last question about HDDs: is WD 2TB Elements SE Black (WDBTML0020BBK-EEUE) by any chance non-SMR?

About SSDs: if I understand correctly, you were suggesting an SSD + enclosure instead of external SSD drive ("M.2 version of WD Green SSD plus an M.2 to USB 3.0 converter enclosure"). Will my legacy computer recognize such device?
What is better: WD Green, or WD Blue?

nadebula.1984
Desconectado
Joined: 05/01/2018

As I've mentioned before, There is only one 2-TB 2.5-inch non-SMR disk: ST2000LM003, which is no longer manufactured for a long time. And Western Digital obviously won't use HDDs from other manufacturers, so don't expect a WD 2 TB portable HDD to be CMR.

As for M.2 SSD, please note that M.2 is only the physical interface. There are two types of data interface: SATA and PCIe (NVMe). Each type requires different enclosure. WD Green's M.2 version is the SATA type, and WD Blue's current M.2 version is the NVMe type (former WD Blue M.2 SSDs used to be SATA, but no longer manufactured). You'll need a WD Green M.2 SSD (up to 480 GB) and an SATA M.2 to USB 3.0 converter box. (The standard 2.5-inch SATA interface SSDs also work, but M.2 ones are much smaller. Also, WD Green and Blue's 2.5-inch models both use plastic casing, which offers no help in heat dissipating, so I choose the M.2 version with a metallic enclosure.)

Yes, I've mentioned the power consumption issue. But my SSD (Intel S3610 1.6 TB) was a high-end enterprise-class one, so it requires more power than a main-stream one. I have used WD Green M.2 on legacy computers, too. It works perfectly even via a USB 2.0 port.

Bob Vegan
Desconectado
Joined: 01/01/2021

If I left this SSD disconnected from power for about 6 months, will the data be lost or damaged?

nadebula.1984
Desconectado
Joined: 05/01/2018

It is theoretically possible for any electronic storage device (SSD, flash memory card, USB disks, etc.) to experience data loss when not powered for a long time (e.g. several years). But saying data loss after 6 months is largely groundless.

Avron
Desconectado
Joined: 08/18/2020

Between an external SSD and an external HDD, which of the two is likely to have a longer life, assuming it is only manipulated gently?

The SSD is almost not subject to mechanical problems but doesn't it have limitations in number or read/write operations that the HDD doesn't have?

Magic Banana

I am a member!

Desconectado
Joined: 07/24/2010

Nowadays, unless we are talking about a special use case (a database server, a disk that will not be alimented for years, etc.), my understanding is that such limitations should be never faced. Anyway, as I said, given the limited bitrate of USB 2.0, I would go for a HDD: cheaper than SSD and a larger capacity. SSD would still provide quicker access times. However, unless the file is fragmented (what essentially does not happen with the good filesystems we have, unless they are almost full), we are talking about a few ms that are gained whenever a new file is accessed.

nadebula.1984
Desconectado
Joined: 05/01/2018

CMR (conventional magnetic recording) disks are barely acceptable. If someone uses an SMR (shingled magnetic recording) disk as system disk via a relatively low-speed interface (e.g. USB 2.0), the result would be disastrous.

loldier
Desconectado
Joined: 02/17/2016

Something like this: SSD with SATA to USB cable, no enclosure.

kingston_sata_ssd.jpg
loldier
Desconectado
Joined: 02/17/2016

One more picture: M.2 SATA enclosure and SATA to USB cable. There's a WD Green 240 M.2 SSD inside.

startech_m2.jpg
Bob Vegan
Desconectado
Joined: 01/01/2021

What free software can be used to test the new SSD?

Magic Banana

I am a member!

Desconectado
Joined: 07/24/2010

For the speed of reading (assuming the tested drive is /dev/sdb):
$ sudo hdparm -t /dev/sdb
You should get a few tens of MB/s, because of the USB 2 interface.

nadebula.1984
Desconectado
Joined: 05/01/2018

Typically, gnome-disk-utility is more than enough.

If your converter box supports SMART (e.g. most converter chipsets from Asmedia support this feature), you can also monitor the SMART data via USB interface.