This HOWTO was copied on July 31 from: http://www.provingground.dk/

Welcome to Karneevor's Linux HOWTO

Created 2003 july 13th

This Howto is about all the things I couldn't find in other HOWTO's. If you find it useful or good, then please main me a note. Otherwise, just spread the word about this HOWTO.

I'm primaraly using SuSE on my computers. But I do mess around with Gentoo, FreeDOS and the second best gaming OS: Windows. I've worked with servers and networks for many years. I started out with Netware and Windows, but later moved on to Linux. I hope that this HOWTO will inspire You to try it out. It works for me.


HOWTO enable SCSI emulation

Determine the physical drives

I only got 2 physical drives as showed in boot.msg:

hdc: PIONEER DVD-RW DVR-105, ATAPI CD/DVD-ROM drive
hdd: Pioneer DVD-ROM ATAPIModel DVD-105S 011, ATAPI CD/DVD-ROM drive

Change the GRUB

This is an example from my /boot/grub/menu.lst:

title linux
kernel (hd0,1)/boot/vmlinuz root=/dev/hde2 vga=0x317 hdc=ide-scsi hdclun=0 hdd=ide-scsi hddlun=1 splash=silent showopts
initrd (hd0,1)/boot/initrd

As you can see the hdc and hdd are set to use scsi emulation and assigned a LUN value.

Change the links in /dev

There was set up 3 symbolic links in /dev:

/dev/cdrom -> sr0
/dev/dvd -> sr2
/dev/dvdrecorder -> sr0

Update your fstab

This is from my /etc/fstab:

/dev/cdrom /media/cdrom auto ro,noauto,user,exec 0 0
/dev/dvd /media/dvd auto ro,noauto,user,exec 0 0
/dev/dvdrecorder /media/dvdrecorder auto ro,noauto,user,exec 0 0

Check that it actually works

Learn what ID's that are assigned to your drives. I had to try by brute force. I learned that “scsidev” for my drives are:

dev=0,0 /dev/dvdrecorder
dev=1,0 /dev/dvd

If you were a little bit awake, you'd notice, as I did, that the 0,0 and 1,0 is related to the lun values defined in GRUB. Got it?

With all that new information I was able to start burning some dvd's for some serious backup.


Burning DVD-R, DVD-RW and CD-R

Hints for understanding Linux and the devices:

List of procedures

Copy DVD (DVD-R & DVD-RW):

  1. readcd dev=0,0 f=somefile
  2. dvdrecord speed=2 dev=0,0 -v somefile
Note that there may be DVD's that hold more than 4.7 GB because they are multi-layer DVD's. You cannot copy those DVD's using the method above.

Create your own DVD from fs tree on current directory (DVD-R & DVD-RW):

  1. mkisofs -r -J -o somefile .
  2. dvdrecord -v speed=2 dev=0,0 -v somefile

Create your own DVD from fs tree on current directory Non Large File variant:

  1. mkisofs -r -J -split-output -o somefile .
  2. dvdrecord dev= 0,0 -v somefile

mkisofs will create several approx. 1 GB files named: somefile_00, somefile_01, somefile_02, ...

cdrecord will activate the Virtual Track method for writing.

Note that you may have troubles with large files on a large file aware OS if the shell you are using is not large file enabled.

Erase data on DVD-RW:

Mini man's:

man dvdrecord
-v Verbose.
-V More verbose.
-f Force to continue on errors.
-dummy Simulate burn.
man mkisofs
-R Uses Rock Ridge protocol.
-r Like -R, but sets file permissions to readable for client.
-J Uses Joliet in addition with iso9660.

HOWTO automount stuff

This is some of the best features in Linux/unix. I will try to explain how simple, yet how great and helpful automount are.

Why automount?
Right. You could set up all the things in fstab and mount every thing manually. It will work, all right. But what if you need some files on a remote server and you're sick and tirred of manually mount it all the time?
Automount mounts that only when needed.

What can you mount with automount?
First of all you can mount cd drives, dvd drives and hard disk partitions. Later on, you might want to try NFS and SMB shares. I'm currently working on mounting ftp sites that way.

The files for automount

Generally speaking there are 2 files:
auto.master and
auto.misc

It all starts with auto.master. In auto.master you can add all the other automount files you need.

For example, in auto.master there's a line:
/mnt/auto           auto.misc

And in auto.misc there is a line:
remote-home       -fstype=nfs,rw       ip_of_remote_server:/home

That means that in /mnt the automount deamon will create a directory called "remote-home".

But when you do a "ls" in /mnt/auto you can't see any directories. Why? Try to cd down to:
cd /mnt/auto/remote-home

Now the fun begins. :-)

How do I access a Windows share?
Try this line in your auto.misc:
host_share       -fstype=smbfs,username=windowsuser,password=windowspassword,uid=500,gid=100       ://host/share

Change uid and gid as to fit your needs

Should I add another auto-file?
I have done it. I made a special auto-file for a single user: myself. :-)
I made a file in /etc called auto.mbs. In that file I set up a single mount point.
I also added the file in auto.master.

I could choose to grant the user(myself) rights to change only that file. There by giving the user the possibility to add some mount points in the future without involving root.

Wether or not this is a good idea, time will tell. Some might argue that there security concerns that needs to be addressed.
Do what you like in that matter.