0
I have a USB drive with three partitions:
- sdb1 is an EFI partition
- sdb2 is an HFS+ partition
- sdb3 is an MSDOS fat partition with Kali linux on it
I can boot into Kali linux using this USB stick on a MacBook and the sdb2 partition shows up on the desktop as HD (the name I gave it when I formatted it on the Mac).
As referenced in this thread, I installed hfsprogs and tried:
sudo mount -o force /dev/sdb2 /media/root/HD
The partition is still read only.
sudo df -hT
gives
Filesystem Type Size Used Avail Use% Mounted on
udev devtmpfs 7.8G 0 7.8G 0% /dev
tmpfs tmpfs 1.6G 9.5M 1.6G 1% /run
/dev/sdb3 vfat 26G 3.4G 23G 14% /lib/live/mount/findiso
/dev/loop0 iso9660 2.8G 2.8G 0 100% /lib/live/mount/medium
/dev/loop1 squashfs 2.5G 2.5G 0 100% /lib/live/mount/rootfs/filesystem.squashfs
tmpfs tmpfs 7.8G 0 7.8G 0% /lib/live/mount/overlay
overlay overlay 7.8G 356M 7.5G 5% /
tmpfs tmpfs 7.8G 0 7.8G 0% /dev/shm
tmpfs tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
tmpfs tmpfs 7.8G 0 7.8G 0% /tmp
tmpfs tmpfs 1.6G 24K 1.6G 1% /run/user/0
/dev/sdb2 hfsplus 3.7G 25M 3.7G 1% /media/root/HD
I tried to unmount the partition:
sudo umount /media/root/HD
and get
umount: /media/root/HD: target is busy
(In some cases useful info about processes that
use the device is found by lsof(8) or fuser(1).)
So, it seems that Linux thinks the HD partition is busy for some reason. Maybe because the boot partition is sdb3? Here is some more info that may help.
issuing:
sudo fdisk /dev/sdb
gives
Welcome to fdisk (util-linux 2.28.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
A hybrid GPT was detected. You have to sync the hybrid MBR manually (expert command 'M').
I have no idea what that means. So then I tried:
fdisk -l
which gives
Disk /dev/sda: 465.9 GiB, 500277790720 bytes, 977105060 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: D4AAF120-967C-41B9-9FA4-EB4EBD806D19
Device Start End Sectors Size Type
/dev/sda1 40 409639 409600 200M EFI System
/dev/sda2 409640 898785143 898375504 428.4G Apple HFS/HFS+
/dev/sda3 898785144 900054679 1269536 619.9M Apple boot
/dev/sda4 900055040 977104895 77049856 36.8G Microsoft basic data
Disk /dev/sdb: 29.6 GiB, 31742492672 bytes, 61997056 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: E93D7B7D-38FD-404B-9163-63AAA9A39ED5
Device Start End Sectors Size Type
/dev/sdb1 40 409639 409600 200M EFI System
/dev/sdb2 409640 8010815 7601176 3.6G Apple HFS/HFS+
/dev/sdb3 8272960 61734871 53461912 25.5G Microsoft basic data
Disk /dev/loop0: 2.9 GiB, 3076767744 bytes, 6009312 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x77e6cfe3
Device Boot Start End Sectors Size Id Type
/dev/loop0p1 * 64 5794271 5794208 2.8G 17 Hidden HPFS/NTFS
/dev/loop0p2 5794272 6009311 215040 105M 1 FAT12
Disk /dev/loop1: 2.5 GiB, 2634285056 bytes, 5145088 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
You can see the Kali Linux partition on sdb3 which I had formatted as MSDOS fat. How can I get sdb2 to be read/write? Or even unmount it?
Have a look at this question.
– dirkt – 2017-03-03T07:06:43.267I know it has been answered before and in fact even referenced the thread in the beginning of my question. The nuance that I am asking about is making an HFS+ partition writable. I realize I can make a whole other mac drive writeable with the above solution but it does not work on a usb stick that contains the mac volume as well as the linux volume that booted the pc. Does the fact that the usb stick is running a 'live linux' system prevent the whole usb stick from being writeable? – aquagremlin – 2017-03-04T16:22:48.127
It would be really, really unusual if the fact it's on an USB matters in any way. All Linux sees are block devices, and it doesn't care by which hardware (or other layers) these block devices are backed. Also, the point is to either (1) disable journalling or (2) force mount it using explicit
rw
. You've done neither. – dirkt – 2017-03-04T16:47:45.670