Linux HowTo: Flash drive (ExFAT) shows as empty on Mac but not Windows

Original Source Link

I have an ExFAT drive that I recently reformatted & erased, and also used disk utility repair on Mac. When I pop it in a Windows machine, I’m able to view and add files. But the drive appears empty on Mac.

Disk Utility shows:

  • External Physical disk: 15.8 GB used (all)
  • External Physical volume: 5.9 GB used, 15.8 GB free

I’m wondering what is causing this discrepancy (how can there be 15.8 GB free if 5.9/15.8 GB are used)? How can I fix this issue (e.g. make files appear on the drive on Mac)?

I’m guessing here because of lack of detailed information but I have seen similar problems before.

I think your external drive has a mix of GPT and MBR based partition information, which confused MacOS (and Disk Utility Repair), but, so far, hasn’t caused problems in Windows.
I say so far… Windows might start acting up as well, especially as you fill the disk with more data, which might be written, but can’t be read back properly.

You best take the safe route here to prevent loss of data.

  • Copy all data of to another medium. (Hopefully nothing is corrupted yet.)
  • In Windows erase the whole disk with the CLEAN command in the DISKPART utility. This insures there is a valid, non-ambiguous, partition table on the disk.
  • After that you can create a new volume on the disk and format it fresh.
    That new volume should also be safe to use on MacOS.

Disk utility on MacOS shows you the volume and the partition table. As you didn’t provide both MacOS release nor Windows release, I cannot investigate further.

But, it may be possible that your external drive lacks partition table, or has a windows dedicated partition table.
Maybe even LVM ? I’m unsure if Windows is able to handle that.

Only Mojave/Catalina are able to use something that looks like LVM on MacOS.

Tagged : /

Making Game: Flash drive (ExFAT) shows as empty on Mac but not Windows

Original Source Link

I have an ExFAT drive that I recently reformatted & erased, and also used disk utility repair on Mac. When I pop it in a Windows machine, I’m able to view and add files. But the drive appears empty on Mac.

Disk Utility shows:

  • External Physical disk: 15.8 GB used (all)
  • External Physical volume: 5.9 GB used, 15.8 GB free

I’m wondering what is causing this discrepancy (how can there be 15.8 GB free if 5.9/15.8 GB are used)? How can I fix this issue (e.g. make files appear on the drive on Mac)?

I’m guessing here because of lack of detailed information but I have seen similar problems before.

I think your external drive has a mix of GPT and MBR based partition information, which confused MacOS (and Disk Utility Repair), but, so far, hasn’t caused problems in Windows.
I say so far… Windows might start acting up as well, especially as you fill the disk with more data, which might be written, but can’t be read back properly.

You best take the safe route here to prevent loss of data.

  • Copy all data of to another medium. (Hopefully nothing is corrupted yet.)
  • In Windows erase the whole disk with the CLEAN command in the DISKPART utility. This insures there is a valid, non-ambiguous, partition table on the disk.
  • After that you can create a new volume on the disk and format it fresh.
    That new volume should also be safe to use on MacOS.

Disk utility on MacOS shows you the volume and the partition table. As you didn’t provide both MacOS release nor Windows release, I cannot investigate further.

But, it may be possible that your external drive lacks partition table, or has a windows dedicated partition table.
Maybe even LVM ? I’m unsure if Windows is able to handle that.

Only Mojave/Catalina are able to use something that looks like LVM on MacOS.

Tagged : /

Code Bug Fix: read/write to a disk without a file system

Original Source Link

I would like to know if anybody has any experience writing data directly to disk without a file system – in a similar way that data would be written to a magnetic tape. In particular I would like to know if/how data is written in blocks, and whether a certain blocksize needs to be specified (like it does when writing to tape), and if there is a disk equivalent of a tape file mark, which separates the archives written to a tape.

We are creating a digital archive for over 1 PB of data, and we want redundancy built in to the system in as many levels as possible (by storing multiple copies using different storage media, and storage formats). Our current system works with tapes, and we have a mechanism for storing the block offset of each archive on each tape so we can restore it.

We’d like to extend the system to work with disk volumes without having to change much of the logic. Another advantage of not having a file system is that the solution would be portable across Operating Systems.

Note that the ability to browse the files on disk is not important in this application, since we are considering this for an archival copy of data which is not accessed independently. Also note that we would already have an index of the files stored in the application database, which we also write to the end of the tape/disk when it is almost full.

EDIT 27/05/2020: It seems that accessing the disk device as a raw/character device is what I’m looking for.

Tagged : / / / /

Linux HowTo: Slides from Word outline don’t match the slide Master

Original Source Link

I am working in Office 365 importing slides to PowerPoint from an outline in Word. I have the slide master set up with the font sizes, types, and colors I want, as well as the bullet types. When I import the slides, however, none of the slide master format appears and even when I right click on thumbnails and choose the slide format or choose my master theme and apply it to all slides.

Is there an option somewhere for formatting of slides imported from an outline?

Is there a work-around so I can change the formatting after the fact?

Thanks

This need doesn’t seem feasible.

When you import slides to PowerPoint from an outline in Word, slides will be rendered in a style that has been set in word.

You can modify their fonts and other settings in the word outline instead of master slides.

Tagged : / / / /

Making Game: Slides from Word outline don’t match the slide Master

Original Source Link

I am working in Office 365 importing slides to PowerPoint from an outline in Word. I have the slide master set up with the font sizes, types, and colors I want, as well as the bullet types. When I import the slides, however, none of the slide master format appears and even when I right click on thumbnails and choose the slide format or choose my master theme and apply it to all slides.

Is there an option somewhere for formatting of slides imported from an outline?

Is there a work-around so I can change the formatting after the fact?

Thanks

This need doesn’t seem feasible.

When you import slides to PowerPoint from an outline in Word, slides will be rendered in a style that has been set in word.

You can modify their fonts and other settings in the word outline instead of master slides.

Tagged : / / / /

Ubuntu HowTo: Burn iso to an external hdd partition

Original Source Link

I am trying to have multiple USB installers for different OSs, like Debian, Ubuntu, windows, etc.
I have an external 2T HDD (Seagate Expansion+) with a single partition in it.
What I want to do is to make a few little partitions in it, and burn the different images to those partitions, without affecting the 50 GB of data I have in the main partition, which I can’t move anywhere.
I just want something like this:

Drive        Size      Bootable

/dev/sdb1    1988 GB  
/dev/sdb2    4 GB       *  
/dev/sdb3    4 GB       * 
/dev/sdb4    4 GB       *

With the 4 GB partitions being bootable OS installers, and without formatting the big partition, because there’s stuff there I can’t move out that I’d like to keep

My operative systems:
Grub dual-boot:

  1. ParrotSec OS 4.9 amd64
  2. Windows 7 Home Premium

I have tried:

Multibootusb -> has bugs and doesn’t start

dd command -> doesn’t support multiboot

Unetbootin -> doesn’t support multiboot

YUMI -> it just gives me access to the live part of the ISO, losing the installer, which is part of my plan

Edit: Nevermind, YUMI did de work, I just accidentally downloaded a live version only of ubuntu instead of the installer

MultiBoot using External USB HDD

You can use MultiBootUSB, http://multibootusb.org/, to install multiple OS to a specific partition on an HDD or each OS to it’s own partition. Multiple persistence is also possible.

enter image description here

MultiBootUSB 9.2 is working with Ubuntu up to 18.04. It will boot ‘buntu 20.04 ISO’s placed in the /multibootusb/iso/ folder. Persistence and UEFI boot is working with Linux versions but not with the Windows version of MBUSB.

It is easy to just install GRUB to a hard drive and use that to boot ISO files. The following was written for USB but also works on HDD: How do I create a Multiboot USB that is compatible with both BIOS and UEFI?

YUMI works just fine. I can install anything i want in a single lartition and choose whatever I want at start-up.

Tagged : / / /

Linux HowTo: convert .mov video to .mp4 with ffmpeg

Original Source Link

I am trying to convert a .mov video to .mp4 with ffmpeg:

ffmpeg -i ~/Desktop/Sample.mov ~/Desktop/Sample.mp4

This doesn’t work though, and when I try to open the produced video in quicktime it tells me that the file is either corrupted or in a format quicktime doesn’t understand.

How do I get this to work?

To convert videos, I like to use handbrake. You can find it here: https://handbrake.fr/ I use it on Linux but it should work well on MAC too.

For HandBrake:

handbrakecli -i {in-video}.mov -e x264 -E facc -o {out-video}.mp4

For ffmpeg:

ffmpeg -i {in-video}.mov -vcodec h264 -acodec aac {out-video}.mp4

Copy

You can stream copy if the MOV file contains video and audio that is compatible with MP4:

ffmpeg -i input.mov -c copy output.mp4
  • Stream copy (-c copy) is like a “copy and paste” so the quality is preserved and the process is fast.

  • Video formats compatible with MP4 include: H.264, H.265/HEVC, AV1 (new format, so not universally supported), MPEG-4 (old format, not supported in HTML5).

  • Audio formats compatible with MP4 include: AAC, MP3 (playback support depends on player), Opus (new format, so not universally supported).

Encode

This will convert the MOV to H.264 video and AAC audio:

ffmpeg -i input.mov -c:v libx264 -c:a aac -vf format=yuv420p -movflags +faststart output.mp4
  • -c:v libx264 choose encoder libx264 to output H.264 video.
  • -c:a aac choose encoder aac to output AAC audio.
  • -vf format=yuv420p chooses YUV 4:2:0 pixel format. libx264 supports many pixel formats and by default will choose a pixel format that most resembles the input. But not all pixel formats are supported by all players. yuv420p is the most compatible and universally supported.
  • -movflags +faststart same as the Web Optimized option in Handbrake. After encoding completes it moves a chunk of info from the end of file to the beginning so it can start playing faster when viewing via download.

See FFmpeg Wiki: H.264 and FFmpeg Wiki: AAC for more info.

Tagged : / / / /

Making Game: convert .mov video to .mp4 with ffmpeg

Original Source Link

I am trying to convert a .mov video to .mp4 with ffmpeg:

ffmpeg -i ~/Desktop/Sample.mov ~/Desktop/Sample.mp4

This doesn’t work though, and when I try to open the produced video in quicktime it tells me that the file is either corrupted or in a format quicktime doesn’t understand.

How do I get this to work?

To convert videos, I like to use handbrake. You can find it here: https://handbrake.fr/ I use it on Linux but it should work well on MAC too.

For HandBrake:

handbrakecli -i {in-video}.mov -e x264 -E facc -o {out-video}.mp4

For ffmpeg:

ffmpeg -i {in-video}.mov -vcodec h264 -acodec aac {out-video}.mp4

Copy

You can stream copy if the MOV file contains video and audio that is compatible with MP4:

ffmpeg -i input.mov -c copy output.mp4
  • Stream copy (-c copy) is like a “copy and paste” so the quality is preserved and the process is fast.

  • Video formats compatible with MP4 include: H.264, H.265/HEVC, AV1 (new format, so not universally supported), MPEG-4 (old format, not supported in HTML5).

  • Audio formats compatible with MP4 include: AAC, MP3 (playback support depends on player), Opus (new format, so not universally supported).

Encode

This will convert the MOV to H.264 video and AAC audio:

ffmpeg -i input.mov -c:v libx264 -c:a aac -vf format=yuv420p -movflags +faststart output.mp4
  • -c:v libx264 choose encoder libx264 to output H.264 video.
  • -c:a aac choose encoder aac to output AAC audio.
  • -vf format=yuv420p chooses YUV 4:2:0 pixel format. libx264 supports many pixel formats and by default will choose a pixel format that most resembles the input. But not all pixel formats are supported by all players. yuv420p is the most compatible and universally supported.
  • -movflags +faststart same as the Web Optimized option in Handbrake. After encoding completes it moves a chunk of info from the end of file to the beginning so it can start playing faster when viewing via download.

See FFmpeg Wiki: H.264 and FFmpeg Wiki: AAC for more info.

Tagged : / / / /

Ubuntu HowTo: Cannot format USB Drive

Original Source Link

I had this USB drive that I did not use for a long time and decided to format it.

But apparently it cannot be formated, because everytime I even delete a folder inside it, the folder comes back after I reinsert the drive.

I don’t know what to do anymore to make the flash drive work again.

Drive on Disk Utility

Update: I tried to erase the partition table by running this code at terminal:

sudo dd if=/dev/zero of=/dev/sdb

The terminal just freezes and nothing happens.

Install gparted. Make new partition table on the thumb drive and choose gpt. Then create a new partition for the drive. Fat-32 is easiest for all operating systems. If only for Ubuntu then ext4 is great. Between Linux and Windows NTFS works fastest with the least limitations.

Tagged : / / /

Code Bug Fix: How do I use the Address formats in i18napis?

Original Source Link

I’m am trying to use the i18napis.appspot.com/address address formats for a React application so that I can create localized address forms, but it’s not clear to me how to use it.
For example, this is the info for Germany:

{
   zipex: "26133,53225",
   key: "DE",
   zip: "d{5}",
   fmt: "%N%n%O%n%A%n%Z %C",
   id: "data/DE",
   posturl: "http://www.postdirekt.de/plzserver/",
   require: "ACZ",
   name: "GERMANY"
}

The zip is a pretty straight forward regex, but how do I use the fmt: "%N%n%O%n%A%n%Z %C" format? What are N O A Z and C in this context?

According to Google’s libaddressinput documentation,

N – Name

O – Organization

A – Street Address Line(s)

Z – Zip or postal code

C – City or Locality

Tagged : / / / /