r3dux.org

A number-pimping side project from the valleys in *NEW* upside-down flavour.

  • Home
  • ABOUT
  • OLD SITE
  • SEARCH
  • FEEDBACK

How to: Create an ISO image of directories in Linux

r3dux | July 29, 2011

I ripped some DVDs I own the other day as I wanted to create a back-up for the kids travel DVD players (so the originals don’t get scratched and trashed on the road), only the DVDs themselves were DVD-9′s (so single-sided dual-layer with a capacity of up to 8.54GB) while I can only write DVD-5′s (single-sided single layer with a capacity of up to 4.7GB) – this isn’t a big problem as I compressed them down to fit using Handbrake and elements of Shetboy’s meticulously crafted AVI to DVD technique. However, both Brasero and GnomeBaker would flat out refuse to burn Video projects – they’d just choke on the folder containing the AUDIO_TS and VIDEO_TS folders – so why not covert the directory including the *_TS folders to an ISO and burn that? No reason why not! Let’s get it done! =P

Making the ISO

Once you’ve got a folder structure containing the AUDIO_TS folder (which is empty) and the VIDEO_TS folder (which contains your .BUP, .IFO and .VOB files), just run the following command to generate your ISO:

mkisofs -o ISO_FILENAME -V LABEL -r SOURCE_DIRECTORY

So, for example, you might use the following command to create an ISO of the directory containing the *_TS folders for the film Avatar:

mkisofs -o ~/AvatarDVD.iso -V Avatar -r ~/dvdprep/Avatar/

Once you hit return, you’ll see something like the following output:

I: -input-charset not specified, using utf-8 (detected in locale settings)
  0.22% done, estimate finish Wed Jul 27 12:30:27 2011
 
..... all the rest ......
 
 99.96% done, estimate finish Wed Jul 27 12:27:58 2011
Total translation table size: 0
Total rockridge attributes bytes: 1353
Total directory bytes: 4096
Path table size(bytes): 42
Max brk space used 21000
2275896 extents written (4445 MB)

Measure Twice, Cut Once

If you wanted to make sure you got it right, as in, you ONLY have the *_TS folders in the iso, not the top level folder containing those two folders also, then just open the created iso file with Archive Manager and take a look, or mount it to a folder with:

mkdir test
sudo mount -o loop -t iso9660 ./AvatarDVD.iso ./test
ls test
 
[ which should show "AUDIO_TS  VIDEO_TS" ]
 
sudo umount ./test

When you’re happy with the iso, burn it with your burning software of choice and you’re all sorted!

Cheers!

Comments
1 Comment »
Categories
How-To, Imagery, Linux
Tags
Burn, Convert, Directories, DVD, Folders, Image, ISO, mkisofs, mount, Rip
Comments rss Comments rss
Trackback Trackback

How To: Mount a NAS in Linux (via CIFS)

r3dux | July 3, 2009

Apparently CIFS is the new Samba, so to mount your NAS via CIFS instead of Samba, read this, then change the fstab line to:

//<YOUR-NAS-IP>/<NAME-OF-NAS-SHARE> /<WHERE-YOU-WANT-TO-MOUNT-THE-NAS> cifs credentials=/root/.credentials,rw,auto,uid=<YOUR-UID-NUMBER-OR-USER-ACCOUNT-NAME>,gid=<YOUR-GID-NUMBER-OR-GROUP-NAME> 0 0

i.e. For me it’s:

//192.168.1.100/Share /mnt/Share cifs credentials=/root/.credentials,rw,auto,uid=r3dux,gid=r3dux 0 0

You might notice reference to a .credentials file above. You need to create this!!

The format of the credentials file [you can call it anything & place it anywhere - just make sure you point to it in the fstab lines(s)] is:

username=YOUR-NAS-USER-NAME
password=YOUR-NAS-PASWORD

So stick the above two lines in a file, substituting appropriately for the accounts and passwords on your NAS, then sudo chmod 600 it and remount the filesystem with sudo mount -a.

Job’s a good ‘un!

Update: Don’t forget – you’ll need to have samba, smbfs and cifs-utils installed for this to work! So go nuts with:

sudo apt-get install samba smbfs cifs-utils

Comments
1 Comment »
Categories
How-To, Linux
Tags
CIFS, How-To, mount, NAS, Samba
Comments rss Comments rss
Trackback Trackback

How To: Mount a NAS in Linux (via Samba)

r3dux | February 25, 2009

Rehaul: CIFS is the new Samba – and while the below is still a good way, CIFS seems to be the way & the path – so glance at this lot to get the fundamentals, then read this article to change to mounting your NAS via CIFS.

First, get samba with the following command: sudo apt-get install samba smbfs

Now, create a folder to use as your mount point on your linux drive (I’m using /mnt/NAS – you can use whatever you’d like): sudo mkdir /mnt/NAS

Then edit your /etc/fstab file with: sudo gedit /etc/fstab

On my NAS I have two separate shares, one of which is called (unimaginatively enough) Share, so I’m going to add lines to /etc/fstab in the following format:

# Mount NAS share
//IP-OF-YOUR-NAS/NAS-SHARE-NAME /SHARE-MOUNT-POINT smbfs username=USER-NAME-OF-NAS-USER,password=PASSWORD-OF-NAS-USER,uid=YOUR-UID-NUMBER,gid=YOUR-GID-NUMBER 0 0

So  -  for my own personal setup, and because I’ve already created a username and password on the NAS [via the NAS' web interface - available at http://IP-OF-YOUR-NAS] called r3dux, I’d put:

# Mount NAS share
//192.168.1.100/Share /mnt/NAS smbfs username=r3dux,password=MyPasswordHere,uid=1000,gid=1000 0 0

There are other ways where you don’t have to put your password in plaintext in the fstab file, but as long as you’ve got it set to read/write only by the root account, no one else can even look at the file to read the password. To set permissions that way, just use: sudo chmod 600 /etc/fstab

Which gives read and write permissions to root, but denies groups and any other users any access whatsoever (even just looking at!)

Job done.

Update: When mounting a NAS there are two user acounts you’re using: 1.) Your linux user account which goes in the uid and gid fields, and 2.) The NAS user account (which is set up from the NAS’ web interface) which goes into the username and password fields.

So if you want to have write access to the NAS, then you’ll need to set up a user account from the NAS’ web interface | Users sections, and mount the NAS as the user the NAS knows about with required privileges. In the fstab line above we’re mounting with user (uid) and group (gid) permissions set to 1000, that is user id 1000 (the id number of the first user on a linux system) [your user id can be looked up in /etc/passwd] and group id 1000 (i.e. the first user on a linux system [in my case my own r3dux group] – your group id can be looked up in /etc/group) – if you want to use other users/group to mount as, feel free.

Update 2: Forgot to mention that this will mount the NAS on reboot, to force a mount using the fstab details you’ve just entered, simply run the command sudo mount -a

Update 3: Fixed the above uid/gid mentions to NOT say anything about linux file permissions – it’s user and group identifiers to mount the NAS by, and NOT standard linux file permissions, mea culpa – fixed.

Comments
1 Comment »
Categories
How-To, Linux
Tags
mount, NAS
Comments rss Comments rss
Trackback Trackback

How To: Mount a SD card in Linux

r3dux | February 4, 2009

Just FYI and because I had to figure it, add the lines:

tifm_core
tifm_sd

to /etc/modules and reboot with the SD card in the card reader.

Tada! SD card will automount. Mine gets mounted at /media/disk

For me at least, if the card ISN’T in the card reader when I boot I can’t get it to recognise it until I reboot with it in, no matter how much I modprobe. Such are the joys of the lin…

If -YOU- know how, please slam it in the comments. Cheers!

Update – September 2011: I wrote this entry a long while back, but in LMDE at least, you can just modprobe the kernel modules like this:

sudo modprobe tifm_core
sudo modprobe tifm_sd

Then insert the SD card and it’ll pick it up, no reboot required.

Comments
No Comments »
Categories
How-To, Linux, Tech
Tags
mount, sd, sd card
Comments rss Comments rss
Trackback Trackback

Translate

Categories

Archives

Tags

3D ActionScript ActionScript 3.0 Adobe AI Ballarat Bash C++ Class Convert CS4 Effect Film Flash GLSL Gnome Hack How-To install Jaunty Java Kinect Linkage Linux Mash-Up Microsoft Motion OpenGL Particle Photoshop Problem PS3 Remix Remove Retro script Slides Sound Systems Ubuntu Video VirtualBox Wii Windows XBox

Gamercard

OpenR3dux

Misc.

Flattr this

RSS Feed

r3dux twitter feed



“Tough guys don't take backups. But they cry a lot.”

rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox