details on the latest SanDisk Ultra 3.2Gen1 32GBytes stick

Why this stick and not 1:1 dd copy a Debian (or other) Live iso on the stick? (Debian even provides Live.iso with a bunch of different desktops to chose from #NOICE!)

  • simply reason: this stick mounts READ AND WRITE, while the live systems are (on purpose?) be designed to be read-only.
  • So this stick is a a LIVE SYSTEM, that stores changes (settings, files) PERMANENTLY, it can be CHANGED 🙂
  • Imho this ia a MASSIVE plus over the cd.iso live systems.
SandDisk Ultra read speed of 100 MBytes/sec! nice :)

SandDisk Ultra read speed of 100 MBytes/sec! nice 🙂

ok to be honest… that might have to do with RAM buffering the writes… the end result stats of dd might be more preceise:

3800+1 records in
3800+1 records out
3985178624 bytes (4.0 GB, 3.7 GiB) copied, 238.199 s, 16.7 MB/s

so write speed of 16.7MBytes/sec is not that bad, it is actually at a price of under 10 bucks, pretty good.

(other sticks might not even reach 10MByte/s write)
(read wise it is much faster than 16MByte/sec)

these sticks have proven to be reliable, fast & cheap (get them for currently 6€ at Amazon or same price on eBay)

but be aware! not all SanDisk Ultra in the past were bootable (the 3.2Gen1 was tested and boots just fine) 🙂

how to make stick for GNU Linux users:

“burning” the image to stick is as easy as: (BUT BE WARNED! DO THIS ON A MACHINE WITHOUT VALUABLE DATA ATTACHED! DOUBLE TRIPPLE CHECK THE DRIVE LETTER! DD IS VERY EFFECTIVE IN DESTROYING DATA!)

lsblk; # show all drives and partitions
# unpack and "burn" image to stick and display the progress (all in one go)
gunzip -c /path/to/IdealLinux2021.usb.stick.img.gz | pv | dd of=/dev/sdx;

or use this script (which double checks the drive letter with the user):

cat /scripts/make_linux_ideal_stick.sh

#!/bin/bash
if [ -z "$1" ]
  then
    echo "please pass device like this: /dev/sdb
          TARGET THE WHOLE DEVICE (sdb)
          NOT A PARTITION! (sdb1)"
  else

    echo "========== do you want to copy the ideal-linux disk image on this device "$1" ?"
read -p "Continue (y/n)?" choice
case "$choice" in 
  y|Y ) echo "yes";;
  n|N ) echo "no";;
  * ) echo "invalid";;
esac
    umount $1*;
    pigz -dc /path/to/IdealLinux2021.img.gz | pv | dd bs=1M of=$1; # write image to usb stick
    sync;
fi

how to make stick for Windows users:

  1. download the image.img.gz
  2. unpack the image.img.gz to image.img
  3. rename image.img to image.iso
  4. use https://sourceforge.net/projects/win32diskimager/ to “burn” the image to stick
  5. get the PC to usb boot! congratz! finished! 🙂

 

 

what to do…

… about the unused usb stick space?

in order to support small USB Sticks (8GBytes) the the /root partition right now has very little space left (few megabytes), a few apt upgrades and /root would be full, so definitely makes sense to at least use 16GByte or 32GByte stick and (as shown below) use the full size of the stick:

  • create new partition
  • in this case gparted is used (apt update; apt install gparted;) but fdisk /dev/sdc will do too 🙂

  • extend the lvm root to it’s maximum capacity:
# show harddisks and partitions
lsblk 
NAME                          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sdc                             8:32   1  28.7G  0 disk  
├─sdc1                          8:33   1   487M  0 part  
├─sdc2                          8:34   1     1K  0 part  
├─sdc3                          8:35   1  21.7G  0 part  <- newly created partition that fills stick
└─sdc5                          8:37   1   6.5G  0 part  
  ├─IdealLinux2021--vg-root   253:5    0  27.2G  0 lvm   
  └─IdealLinux2021--vg-swap_1 253:6    0   976M  0 lvm   

# make it a lvm volume
pvcreate /dev/sdc3

# add this lvm volume to volume group
vgextend IdealLinux2021--vg-root /dev/sdc3

# extended lvm partition (creditz RedHat)
lvextend -l +100%FREE /dev/mapper/IdealLinux2021--vg-root

# required before resizing filesystem ext4
e2fsck -f /dev/mapper/IdealLinux2021--vg-root

# resize filesystem ext4
resize2fs -p /dev/mapper/IdealLinux2021--vg-root

# DONE :)

lsblk
# end result
NAME                          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sdc                             8:32   1  28.7G  0 disk  
├─sdc1                          8:33   1   487M  0 part  
├─sdc2                          8:34   1     1K  0 part  
├─sdc3                          8:35   1  21.7G  0 part  
│ └─IdealLinux2021--vg-root   253:5    0  27.2G  0 lvm   
└─sdc5                          8:37   1   6.5G  0 part  
  ├─IdealLinux2021--vg-root   253:5    0  27.2G  0 lvm   
  └─IdealLinux2021--vg-swap_1 253:6    0   976M  0 lvm   

# try boot it :)

sequential benchmark of the SanDisk Ultra 32GB stick:

the benchmark script looks like this:

cat /scripts/bench/bench_harddisk.sh
#!/bin/bash
echo "=== starting harddisk sequential write and read bench v1 ==="
echo "no need to run it as root"
echo "========== writing 3GB of zeroes =========="
time dd if=/dev/zero of=./testfile bs=3G count=1 oflag=direct

echo "========== reading 6GB of zeroes =========="
time dd if=./testfile bs=3GB count=1 of=/dev/null

echo "========== tidy up remove testfile =========="
rm -rf ./testfile;

the results for the stick:

time /scripts/bench/bench_harddisk.sh 
=== starting harddisk sequential write and read bench v1 ===
no need to run it as root
========== writing 3GB of zeroes ==========
0+1 records in
0+1 records out
2147479552 bytes (2.1 GB, 2.0 GiB) copied, 89.3501 s, 24.0 MB/s

real	1m29.523s
user	0m0.001s
sys	0m3.729s
========== reading 6GB of zeroes ==========
0+1 records in
0+1 records out
2147479552 bytes (2.1 GB, 2.0 GiB) copied, 12.8516 s, 167 MB/s

real	0m12.992s
user	0m0.001s
sys	0m2.742s
========== tidy up remove testfile ==========

real	1m42.690s
user	0m0.006s
sys	0m6.640s

hardware details:

lsusb -v -d 0781:5581

Bus 002 Device 003: ID 0781:5581 SanDisk Corp. Ultra
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         9
  idVendor           0x0781 SanDisk Corp.
  idProduct          0x5581 Ultra
  bcdDevice            1.00
  iManufacturer           1  USB
  iProduct                2  SanDisk 3.2Gen1
  iSerial                 3 05012bade368a1e160....
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x002c
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              896mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength       0x0016
  bNumDeviceCaps          2
  USB 2.0 Extension Device Capability:
    bLength                 7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes   0x00000002
      HIRD Link Power Management (LPM) Supported
  SuperSpeed USB Device Capability:
    bLength                10
    bDescriptorType        16
    bDevCapabilityType      3
    bmAttributes         0x00
    wSpeedsSupported   0x000e
      Device can operate at Full Speed (12Mbps)
      Device can operate at High Speed (480Mbps)
      Device can operate at SuperSpeed (5Gbps)
    bFunctionalitySupport   1
      Lowest fully-functional device speed is Full Speed (12Mbps)
    bU1DevExitLat          10 micro seconds
    bU2DevExitLat         256 micro seconds
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x000c
  (Bus Powered)
  U1 Enabled
  U2 Enabled

todo: (for next version image)

  • o change desktop background to cosmos slideshow (#noice 🙂
  • o make softlinks for easer access to mate-terminal & firefox
ln -sv /usr/bin/mate-terminal /usr/bin/terminal
ln -sv /usr/bin/mate-terminal /usr/bin/term
ln -sv /usr/bin/firefox /usr/bin/fox
  • o come up with an easy setupr process from usb stick
  • oo increase size of /root partition per default/automatically during setup process

or:

  • ok figure out how to lvm resize (+increase-extend) /root partition with left usb stick space (see above)
  • o install cool tool convmv for windows filename to GNU Linux filename conversion
  • o install scripts.tar.gz & bash.bashrc
  • o install_basics.sh
cat /scripts/install_basics.sh 
#!/bin/bash
echo "=== install the basic tools needed to work with a system ==="
apt update
echo "== no gui =="
apt install -y ssh htop vim pv curl wget tmux net-tools bc screen secure-delete rsync ccze apt-transport-https imagemagick parallel dnsutils moc ffmpeg inxi lvm2 rfkill
echo "== with gui =="
apt install -y hardinfo mozo
# make filesystem check on every boot (it is fast with ext4)
tune2fs -C 2 -c 1 /dev/sda1
  • o desktop modifications:
    • o change mate-terminal color to green on black
    • o put firefox on desktop rename it “fox”
    • o put LibreOffice –writer on desktop rename it “writer”
    • o put thunderbird on desktop name it “mail”
    • o Print -> Screenshot should always save under~/Pictures/Screenshots
    • o caja preferences -> always list, never icons
  • o bonus games:

have phun! 🙂

 

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin