Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: Santos on August 04, 2018, 12:39:28 PM
-
Disk /dev/sde: 15 GB, 16005464064 bytes, 31260672 sectors
1945 cylinders, 255 heads, 63 sectors/track
Units: cylinders of 16065 * 512 = 8225280 bytes
Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
/dev/sde1 81 0,32,33 1023,254,63 2048 31260671 31258624 14.9G 7 HPFS/NTFS
In TinyCore i can't mount the usb with this line:
$ sudo mount -o offset=1048576 /dev/sde /home/tc/sde
2048*512 = 1048576
To be able to mount the usb as read-only in TinyCore i need to install:
utils-linux
Anyway, in TinyCore i can't write to the drive (In dCore i just need to install ntfs-3g)
I tried to install:
ntfs-3g.tcz
ntfsprogs.tcz
scrounge-ntfs.tcz
dosfstools.tcz
But it doesn't matter because it only shows me the read permissions, and i only can copy files using sudo.
In TinyCore i tried:
$ sudo mount --rw -o offset=1048576 /dev/sde /home/tc/sde
I got the same read-only folder.
I'm missing something?
-
Why are you using manual offsets when the partition was correctly detected? "sudo mount /dev/sde1" would mount it to /mnt/sde1, and if ntfs-3g was loaded before you plugged the usb stick in, it would be used.
If you mount manually, you need to pass "-t ntfs-3g".
-
I'm not sure with the offset value
However, to have read-write access to a NTFS partition
I'd usually do
tce-load -i ntfs-3g
sudo ntfs-3g /dev/sde1 /mnt/sde1
-
Hi, thank you for answer.
Well, my usb device it was an usb used to install WinXp to a computer years ago. I found the memory stick and start to store files in it using Windows (Windows Mounts it automatically, i does not need to do something else). The method i used was a program called Rufus, so it format the usb like a CD-ROM, thats mean no partition table, only a big NTFS-like partition covering the whole usb device.
Then when i switch to Unix's OSes i found none of the major distros would mount the device, when i search on internet i found a tutorial about mounting a IMG/ISO (i don't remember) file with the offset number, i tried with the usb device and it worked, since then i use the same method.
Even if the fdisk input tells something about a partition it doesn't show in the MountTool of TinyCore. And doesn't mount like a partition, i need to point to the whole device (/dev/sde) instead of the partition (/dev/sde1) to be able to mount it.
Why are you using manual offsets when the partition was correctly detected? "sudo mount /dev/sde1" would mount it to /mnt/sde1, and if ntfs-3g was loaded before you plugged the usb stick in, it would be used.
If you mount manually, you need to pass "-t ntfs-3g".
>Why are you using manual offsets when the partition was correctly detected?
Because the partition does not exist in the device.
Output of Slitaz distro (i can write to the usb device in Slitaz, but the same fdisk behavior as TinyCore)
tux@slitaz:~$ fdisk -l
Partition table entries are not in disk order
Disk /dev/sdb: 15 GB, 16005464064 bytes, 31260672 sectors
1945 cylinders, 255 heads, 63 sectors/track
Units: cylinders of 16065 * 512 = 8225280 bytes
Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
/dev/sdb1 81 0,32,33 1023,254,63 2048 31260671 31258624 14.9G 7 HPFS/NTFS
tux@slitaz:~$
tux@slitaz:~$ mkdir sdb
tux@slitaz:~$ sudo mount -o offset=1048576 /dev/sdb1 sdb/
Password:
mount: /dev/sdb1: error al configurar dispositivo de bucle: No existe el fichero o el directorio
tux@slitaz:~$
tux@slitaz:~$
tux@slitaz:~$ sudo mount -o offset=1048576 /dev/sdb sdb/
Password:
tux@slitaz:~$
tux@slitaz:~$ mount
tmpfs on /run type tmpfs (rw,relatime)
tmpfs on / type tmpfs (rw,relatime,size=1857004k,nr_inodes=0)
proc on /proc type proc (rw,relatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=1008680k,nr_inodes=209474,mode=755)
sysfs on /sys type sysfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,nosuid,noexec,relatime)
tmpfs on /var/lock type tmpfs (rw,nosuid,noexec,relatime)
gvfsd-fuse on /home/tux/.gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)
/dev/sdb on /home/tux/sdb type fuseblk (rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
tux@slitaz:~$
tux@slitaz:~$ ls -ls .
total 16
0 drwxr-xr-x 2 tux users 60 Jan 7 1980 Desktop
0 drwxr-xr-x 2 tux users 40 Jan 7 1980 Documents
0 drwxr-xr-x 2 tux users 40 Jan 7 1980 Downloads
0 drwxr-xr-x 3 tux users 60 Jan 7 1980 Images
0 drwxr-xr-x 2 tux users 40 Jan 7 1980 Music
4 -rw-r--r-- 1 tux users 1502 Aug 6 04:32 ntfsissue
0 drwxr-xr-x 2 tux users 40 Jan 7 1980 Public
12 drwxrwxrwx 1 root root 12288 Jan 4 1980 sdb
0 drwxr-xr-x 2 tux users 260 Jan 7 1980 Templates
0 drwxr-xr-x 2 tux users 40 Jan 7 1980 Videos
tux@slitaz:~$
> "sudo mount /dev/sde1" would mount it to /mnt/sde1, and if ntfs-3g was loaded before you plugged the usb stick in, it would be used.
Well, that doesn't work in TinyCore, not with my usb.
>If you mount manually, you need to pass "-t ntfs-3g".
Ok, i will use this. Maybe i need to specify this parameter.
I'm not sure with the offset value
However, to have read-write access to a NTFS partition
I'd usually do
tce-load -i ntfs-3g
sudo ntfs-3g /dev/sde1 /mnt/sde1
>I'm not sure with the offset value
I found the tip of multiply the start sector 2048 * 512 in a tutorial. I don't know, but that value work for me in other distros.
I will try this line too.
tce-load -i ntfs-3g
sudo ntfs-3g /dev/sde1 /mnt/sde1
Thank you.
I know the simple way to go with this is to make a backup of the data and format properly the usb device, but i'm curious why i can't do this with TinyCore even when i have the same tools as other distros (util-linux, ntfs*).
-
Now i can mount my usb.
I have to do the following:
-Install binutils (-offset- option, as far as i know, Busybox mount doesn't have the option)
-Install ntfs-3g (NTFS support)
That's it. Orden matters and i need to close the aterm window and open up a new one, because the previous one doesn't recognize the new tools installed.
mkdir usb ; sudo mount -t ntfs-3g -o offset=1048576 /dev/sda usb/
Thank you.