Wednesday, November 14, 2007

Mounting and Sharing CD/DVD ISO Images with Ubuntu and Samba

This is a WIP, draft quality now:

If you plan on having more then 8 Loop devices (loop0 - loop7) you need to set an option in "/etc/modprobe.d/options" called "option loop max_loop=255", or whatever number you need, then reboot the system.

  1. Copy the CD/DVD Images to a folder on your Ubuntu system hard disk
  2. Mount the image with the following command:
    • Syntax: mount -t iso9660 -o loop /path/to/image.iso /path/to/mountpoint
    • Real example: mount -t iso9660 -o loop /opt/CDImages/Ubuntu-710.iso /mnt
  3. Edit the samba config file:
    • vi /etc/samba/smb.conf
  4. Add the following lines:
[Sharename]
comment = Some descriptive comment or serial key
path = /mnt
valid users = testuser
available = yes
browseable = yes
public = yes
writeable = no

  1. Now add a user that we will use for authentication
    • useradd testuser
    • usermod -s /bin/false testuser
  2. Make sure you do NOT set a UNIX password for this account, we don't want people logging into the Linux box
  3. DO set a password for samba
    • smbpasswd -a testuser
  4. restart the samba server
    • /etc/init.d/samba restart
Now in your windows machine open windows explorer or my computer. In the address bar type \\servername OR \\svr.ip.add.res

NOTE this has change fro 10.04.1:

you need to modify your "/boot/grub/grub.cfg" and modify your menu entries to look like the follwing, note the "max_loop=128" part of the kernel line:

menuentry 'Ubuntu, with Linux 2.6.32-30-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 30c0ecfe-1708-4bec-b545-127d23466906
linux /vmlinuz-2.6.32-30-generic-pae root=/dev/mapper/Hostname-root ro quiet max_loop=128
initrd /initrd.img-2.6.32-30-generic-pae
}

First Gen Zune Firmware Update

I don't know anyone who has covered this topic on how to update your zune to the latest firmware. It's very simple, go to zune.net and get the new software front end. Once you have installed that over your old front end, plug in your first get Zune. It will automatically detect that you need to update your firmware. Once you tell it to begin, the process takes approx 8-10 minutes. That's it!

Friday, November 9, 2007

Compiling a Custom Kernel for Ubuntu

  1. Install necessary packages:
    1. apt-get install kernel-package libncurses5-dev fakeroot wget bzip2
  1. Download the kernel sources from www.kernel.org
  2. Extract them
  3. ln -s linux-kernel-version linux
  4. change directory into "linux"
  5. Copy the current kernel's config:
    1. cp /boot/config-`uname -r` ./.config
  6. Start the GUI kernel configuration
    1. make menuconfig
  7. Save the config
  8. Start the compile
    1. make-kpkg clean
    2. fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers
  9. After it's done compiling, which may take 30 minutes or much more you will have to .deb packages in the /usr/src directory, install them
    1. dpkg -i kernel-image-2.6.23-custom_10.00.Custom_i386.deb
    2. dpkg -i kernel-headers-2.6.23-custom_10.00.Custom_i386.deb
  10. verify that the entries are in grub
    1. vi /boot/grub/menu.lst
  11. reboot

Friday, November 2, 2007