WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Persistent USBstik ID !  (Read 134 times)

Offline labeas

  • Jr. Member
  • **
  • Posts: 94
Persistent USBstik ID !
« on: March 26, 2017, 06:34:47 AM »
... is particularly important for TinyCore - obviously!

Assume you want to be able to plug a USB-hdd and use a FIXED script
which does `chroot` to the USB-hdd's partition labeled: "Toshi3".

]   Since the USB devices re-allocate the sdX amongst themselves
]   in differnt ways, it take a big job for each new re-boot to
]   find out how to access the different devices:partitions.

>] Try: blkid /dev/sd*

# blkid | grep Toshi3 ==
/dev/sdc3: LABEL="Toshi3" UUID="ae678dbe-0f5c-4a2f-9c91-86b1e1c4700a"
 SEC_TYPE="ext2" TYPE="ext3" PARTUUID="b20ab9d1-03"

# mount LABEL="Toshi3"  /mnt/Toshi3
mount: mounting LABEL=Toshi3 on /mnt/Toshi3 failed: No such file or directory

# ls /mnt/T*
/mnt/T4:
/mnt/Toshi3:

Actually, this is not surprising; since NORMALLY I can't mount.
unless I try CLI & try mountTool & try CLI. Ie. 3 <calls>.
Let's see how it is with TC's stik, which does not connect via.
a USB-extender.

That needs a reboot, since TC can't do:
 lsof | grep sdb1
 to find which pid is holding sdb1: the only unmountable device not
  connected via the USB extender.
..
OK! Let's try the Laptops M$:partition

# mount /dev/sda4 /mnt/sda4
mount: mounting /dev/sda4 on /mnt/sda4 failed: Invalid argument

# ls /mnt/sda4
# blkid | grep sda4
/dev/sda4: UUID="B268042D6803EF43" TYPE="ntfs" PARTLABEL="Basic data partition"
 PARTUUID="b0848bd4-c89e-4a5e-8ab7-ab964d362f4f"

It would mount if I first used the <mounTool>

This is a big problem for me.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 9070
Re: Persistent USBstik ID !
« Reply #1 on: March 26, 2017, 06:56:04 AM »
# blkid | grep sda4
/dev/sda4: UUID="B268042D6803EF43" TYPE="ntfs" PARTLABEL="Basic data partition"
 PARTUUID="b0848bd4-c89e-4a5e-8ab7-ab964d362f4f"

Did you try:
Code: [Select]
$ sudo mount -t ntfs /dev/sda4 /mnt/sda4

Offline polikuo

  • Full Member
  • ***
  • Posts: 127
Re: Persistent USBstik ID !
« Reply #2 on: March 26, 2017, 07:39:57 AM »
It would mount if I first used the <mounTool>

You need to rebuild /etc/fstab whenever you plug in a removable device.
Code: [Select]
sudo rebuildfstab

The command above is hard-coded in the mnttool
If you're under CLI, remember to run it after you plug in your USB.