Fetch Contents files from apt-sources
root@ubuntu:~# apt-file update
Downloading complete file http://mirror.anl.gov/ubuntu/dists/lucid/Contents-amd64.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 16.7M 100 16.7M 0 0 13.2M 0 0:00:01 0:00:01 --:--:-- 13.3M
Downloading complete file http://mirror.anl.gov/ubuntu/dists/lucid-updates/Contents-amd64.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 5738k 100 5738k 0 0 8368k 0 --:--:-- --:--:-- --:--:-- 8389k
Downloading complete file http://mirror.anl.gov/ubuntu/dists/lucid-security/Contents-amd64.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3321k 100 3321k 0 0 9.7M 0 --:--:-- --:--:-- --:--:-- 9.8M
Downloading Index http://mirror.anl.gov/ubuntu/dists/lucid/Contents-amd64.diff/Index:
No Index available.
Downloading complete file http://mirror.anl.gov/ubuntu/dists/lucid/Contents-amd64.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
File is up-to-date.
Downloading Index http://mirror.anl.gov/ubuntu/dists/lucid-updates/Contents-amd64.diff/Index:
No Index available.
Downloading complete file http://mirror.anl.gov/ubuntu/dists/lucid-updates/Contents-amd64.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
File is up-to-date.
Downloading Index http://mirror.anl.gov/ubuntu/dists/lucid-security/Contents-amd64.diff/Index:
No Index available.
Downloading complete file http://mirror.anl.gov/ubuntu/dists/lucid-security/Contents-amd64.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
File is up-to-date.
Downloading Index http://mirror.anl.gov/ubuntu/dists/lucid/Contents-amd64.diff/Index:
No Index available.
Downloading complete file http://mirror.anl.gov/ubuntu/dists/lucid/Contents-amd64.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
File is up-to-date.
Downloading Index http://mirror.anl.gov/ubuntu/dists/lucid-updates/Contents-amd64.diff/Index:
No Index available.
Downloading complete file http://mirror.anl.gov/ubuntu/dists/lucid-updates/Contents-amd64.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
File is up-to-date.
Downloading Index http://mirror.anl.gov/ubuntu/dists/lucid-security/Contents-amd64.diff/Index:
No Index available.
Downloading complete file http://mirror.anl.gov/ubuntu/dists/lucid-security/Contents-amd64.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
File is up-to-date.
Ignoring source without Contents File:
http://archive.canonical.com/dists/lucid/Contents-amd64.gz |
root@ubuntu:~# apt-file update
Downloading complete file http://mirror.anl.gov/ubuntu/dists/lucid/Contents-amd64.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 16.7M 100 16.7M 0 0 13.2M 0 0:00:01 0:00:01 --:--:-- 13.3M
Downloading complete file http://mirror.anl.gov/ubuntu/dists/lucid-updates/Contents-amd64.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 5738k 100 5738k 0 0 8368k 0 --:--:-- --:--:-- --:--:-- 8389k
Downloading complete file http://mirror.anl.gov/ubuntu/dists/lucid-security/Contents-amd64.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3321k 100 3321k 0 0 9.7M 0 --:--:-- --:--:-- --:--:-- 9.8M
Downloading Index http://mirror.anl.gov/ubuntu/dists/lucid/Contents-amd64.diff/Index:
No Index available.
Downloading complete file http://mirror.anl.gov/ubuntu/dists/lucid/Contents-amd64.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
File is up-to-date.
Downloading Index http://mirror.anl.gov/ubuntu/dists/lucid-updates/Contents-amd64.diff/Index:
No Index available.
Downloading complete file http://mirror.anl.gov/ubuntu/dists/lucid-updates/Contents-amd64.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
File is up-to-date.
Downloading Index http://mirror.anl.gov/ubuntu/dists/lucid-security/Contents-amd64.diff/Index:
No Index available.
Downloading complete file http://mirror.anl.gov/ubuntu/dists/lucid-security/Contents-amd64.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
File is up-to-date.
Downloading Index http://mirror.anl.gov/ubuntu/dists/lucid/Contents-amd64.diff/Index:
No Index available.
Downloading complete file http://mirror.anl.gov/ubuntu/dists/lucid/Contents-amd64.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
File is up-to-date.
Downloading Index http://mirror.anl.gov/ubuntu/dists/lucid-updates/Contents-amd64.diff/Index:
No Index available.
Downloading complete file http://mirror.anl.gov/ubuntu/dists/lucid-updates/Contents-amd64.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
File is up-to-date.
Downloading Index http://mirror.anl.gov/ubuntu/dists/lucid-security/Contents-amd64.diff/Index:
No Index available.
Downloading complete file http://mirror.anl.gov/ubuntu/dists/lucid-security/Contents-amd64.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
File is up-to-date.
Ignoring source without Contents File:
http://archive.canonical.com/dists/lucid/Contents-amd64.gz
Find what package installs a file
root@ubuntu:~# apt-file search /etc/init/upstart-udev-bridge.conf
upstart: /etc/init/upstart-udev-bridge.conf |
root@ubuntu:~# apt-file search /etc/init/upstart-udev-bridge.conf
upstart: /etc/init/upstart-udev-bridge.conf
List the files installed by a package
root@ubuntu:~# apt-file list upstart
brltty: /usr/share/doc/brltty/examples/upstart.job
cloud-init: /usr/share/doc/cloud-init/examples/upstart-cloud-config.txt
cloud-init: /usr/share/doc/cloud-init/examples/upstart-rclocal.txt
debhelper: /usr/share/debhelper/autoscripts/postinst-upstart
debhelper: /usr/share/debhelper/autoscripts/postinst-upstart-replace
debhelper: /usr/share/debhelper/autoscripts/postinst-upstart-restart
debhelper: /usr/share/debhelper/autoscripts/prerm-upstart
debhelper: /usr/share/debhelper/autoscripts/prerm-upstart-norestart
ebox-openvpn: /usr/share/ebox/stubs/openvpn/upstart.mas
ifupdown: /etc/network/if-down.d/upstart
ifupdown: /etc/network/if-up.d/upstart
... |
root@ubuntu:~# apt-file list upstart
brltty: /usr/share/doc/brltty/examples/upstart.job
cloud-init: /usr/share/doc/cloud-init/examples/upstart-cloud-config.txt
cloud-init: /usr/share/doc/cloud-init/examples/upstart-rclocal.txt
debhelper: /usr/share/debhelper/autoscripts/postinst-upstart
debhelper: /usr/share/debhelper/autoscripts/postinst-upstart-replace
debhelper: /usr/share/debhelper/autoscripts/postinst-upstart-restart
debhelper: /usr/share/debhelper/autoscripts/prerm-upstart
debhelper: /usr/share/debhelper/autoscripts/prerm-upstart-norestart
ebox-openvpn: /usr/share/ebox/stubs/openvpn/upstart.mas
ifupdown: /etc/network/if-down.d/upstart
ifupdown: /etc/network/if-up.d/upstart
...
root@ubuntu:~# ifconfig -a wlan0
wlan0 Link encap:Ethernet HWaddr FF:FF:FF:FF:FF:FF
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:66769 errors:0 dropped:0 overruns:0 frame:0
TX packets:9225 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:22089814 (22.0 MB) TX bytes:1509599 (1.5 MB)
root@ubuntu:~# ifconfig wlan0 down
root@ubuntu:~# ifconfig wlan0 hw ether AA:AA:AA:AA:AA:AA
root@ubuntu:~# ifconfig wlan0 up
root@ubuntu:~# ifconfig -a wlan0
wlan0 Link encap:Ethernet HWaddr AA:AA:AA:AA:AA:AA
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:66977 errors:0 dropped:0 overruns:0 frame:0
TX packets:9399 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:22181538 (22.1 MB) TX bytes:1534290 (1.5 MB) |
root@ubuntu:~# ifconfig -a wlan0
wlan0 Link encap:Ethernet HWaddr FF:FF:FF:FF:FF:FF
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:66769 errors:0 dropped:0 overruns:0 frame:0
TX packets:9225 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:22089814 (22.0 MB) TX bytes:1509599 (1.5 MB)
root@ubuntu:~# ifconfig wlan0 down
root@ubuntu:~# ifconfig wlan0 hw ether AA:AA:AA:AA:AA:AA
root@ubuntu:~# ifconfig wlan0 up
root@ubuntu:~# ifconfig -a wlan0
wlan0 Link encap:Ethernet HWaddr AA:AA:AA:AA:AA:AA
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:66977 errors:0 dropped:0 overruns:0 frame:0
TX packets:9399 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:22181538 (22.1 MB) TX bytes:1534290 (1.5 MB)
References
root@ubuntu:~# fdisk -l
Disk /dev/sda: 128.0 GB, 128035676160 bytes
255 heads, 63 sectors/track, 15566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000a735a
Device Boot Start End Blocks Id System
/dev/sda1 * 1 61 487424 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 61 15567 124546048 83 Linux
root@ubuntu:~# ls /dev/mapper/
control
root@ubuntu:~# cryptsetup luksOpen /dev/sda2 encrypted-partition
Enter passphrase for /dev/sda2:
Key slot 0 unlocked.
root@ubuntu:~# ls /dev/mapper/
control encrypted-partition
root@ubuntu:~# mkdir /mnt/encrypted-partition
root@ubuntu:~# mount /dev/mapper/encrypted-partition /mnt/encrypted-partition/
mount: unknown filesystem type 'LVM2_member'
root@ubuntu:~# apt-get install lvm2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libdevmapper-event1.02.1 watershed
The following NEW packages will be installed:
libdevmapper-event1.02.1 lvm2 watershed
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 447kB of archives.
After this operation, 1,282kB of additional disk space will be used.
Do you want to continue [Y/n]? y
root@ubuntu:~# sudo /sbin/modprobe dm-mod
root@ubuntu:~# /sbin/lsmod | grep dm_crypt
dm_crypt 11331 1
root@ubuntu:~# vgscan
Reading all physical volumes. This may take a while...
Found volume group "system" using metadata type lvm2
root@ubuntu:~# vgchange -ay system
3 logical volume(s) in volume group "system" now active
root@ubuntu:~# lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
root system -wi-ao 113.19g
swap system -wi-a- 2.79g
tmp system -wi-a- 2.79g
root@ubuntu:~# ls /dev/mapper/
control encrypted-partition system-root system-swap system-tmp
root@ubuntu:~# mount /dev/mapper/system-root /mnt/encrypted-partition/
root@ubuntu:~# ls /mnt/encrypted-partition/
bin etc initrd.img.old lost+found opt sbin sys var
boot home lib media proc selinux tmp vmlinuz
dev initrd.img lib64 mnt root srv usr vmlinuz.old |
root@ubuntu:~# fdisk -l
Disk /dev/sda: 128.0 GB, 128035676160 bytes
255 heads, 63 sectors/track, 15566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000a735a
Device Boot Start End Blocks Id System
/dev/sda1 * 1 61 487424 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 61 15567 124546048 83 Linux
root@ubuntu:~# ls /dev/mapper/
control
root@ubuntu:~# cryptsetup luksOpen /dev/sda2 encrypted-partition
Enter passphrase for /dev/sda2:
Key slot 0 unlocked.
root@ubuntu:~# ls /dev/mapper/
control encrypted-partition
root@ubuntu:~# mkdir /mnt/encrypted-partition
root@ubuntu:~# mount /dev/mapper/encrypted-partition /mnt/encrypted-partition/
mount: unknown filesystem type 'LVM2_member'
root@ubuntu:~# apt-get install lvm2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libdevmapper-event1.02.1 watershed
The following NEW packages will be installed:
libdevmapper-event1.02.1 lvm2 watershed
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 447kB of archives.
After this operation, 1,282kB of additional disk space will be used.
Do you want to continue [Y/n]? y
root@ubuntu:~# sudo /sbin/modprobe dm-mod
root@ubuntu:~# /sbin/lsmod | grep dm_crypt
dm_crypt 11331 1
root@ubuntu:~# vgscan
Reading all physical volumes. This may take a while...
Found volume group "system" using metadata type lvm2
root@ubuntu:~# vgchange -ay system
3 logical volume(s) in volume group "system" now active
root@ubuntu:~# lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
root system -wi-ao 113.19g
swap system -wi-a- 2.79g
tmp system -wi-a- 2.79g
root@ubuntu:~# ls /dev/mapper/
control encrypted-partition system-root system-swap system-tmp
root@ubuntu:~# mount /dev/mapper/system-root /mnt/encrypted-partition/
root@ubuntu:~# ls /mnt/encrypted-partition/
bin etc initrd.img.old lost+found opt sbin sys var
boot home lib media proc selinux tmp vmlinuz
dev initrd.img lib64 mnt root srv usr vmlinuz.old
Unmount
root@ubuntu:~# umount /mnt/system-root
root@ubuntu:~# cryptsetup remove encrypted-partition |
root@ubuntu:~# umount /mnt/system-root
root@ubuntu:~# cryptsetup remove encrypted-partition
References
UNetbootin
UNetbootin allows you to create bootable Live USB drives for Ubuntu, Fedora, and other Linux distributions without burning a CD. It runs on Windows, Linux, and Mac OS X.
http://unetbootin.sourceforge.net/
Rufus
Create USB installation media from bootable ISOs (Windows, Linux, EFI, etc.) It is only availalbe for Windows.
http://rufus.akeo.ie/
If you’ve lost your Windows 7 product key, it’s located in the registry but is encrypted and not readable, making obtaining it difficult. Product keys were not encrypted in previous versions of Windows. Magical Jelly Bean Keyfinder is a free key finder program.
Resources
A Debian Live system is a Debian operating system that does not require a classical installer to use it. It comes on various media, including CD-ROM, USB sticks, or via netboot.
http://live.debian.net/
GParted Live is a small bootable GNU/Linux distribution for x86 based computers. It enables you to use all the features of the latest versions of the GParted application.
http://gparted.sourceforge.net/livecd.php
Memtest86 is a thorough, stand alone memory test for x86 architecture computers. Web site: http://www.memtest.org/
From the download page, download either the Pre-Compiled Bootable ISO in order to create a CD or the Auto-installer for a bootable USB drive (Win 9x/2k/xp/7).
FreeDOS is a free DOS-compatible operating system for IBM-PC compatible systems. FreeDOS is made of up many different, separate programs that act as “packages” to the overall FreeDOS Project.
http://www.freedos.org/
David Lehman's System Administration Blog