“UbuntuHelp:AptCdrom”的版本间的差异
来自Ubuntu中文
小 |
小 |
||
第18行: | 第18行: | ||
==== Description and options ==== | ==== Description and options ==== | ||
* '''add''' is used to add a new disc to the source list. It will unmount the CDROM device, prompt for a disk to be inserted and then procceed to scan it and copy the index files. If the disc does not have a proper .disk/ directory you will be prompted for a descriptive title. APT uses a CDROM ID to track which disc is currently in the drive and maintains a database of these IDs in /var/lib/apt/cdroms.list | * '''add''' is used to add a new disc to the source list. It will unmount the CDROM device, prompt for a disk to be inserted and then procceed to scan it and copy the index files. If the disc does not have a proper .disk/ directory you will be prompted for a descriptive title. APT uses a CDROM ID to track which disc is currently in the drive and maintains a database of these IDs in /var/lib/apt/cdroms.list | ||
− | * '''ident''' is a [[UbuntuHelp:debugging]] tool to report the identity of the current disc as well as the stored file name. | + | * '''ident''' is a [[UbuntuHelp:debugging|debugging]] tool to report the identity of the current disc as well as the stored file name. |
*'''-d''' or '''--cdrom''' : MountPoint (specify the location to mount the cdrom). This mount point must be listed in /etc/fstab and properly configured. | *'''-d''' or '''--cdrom''' : MountPoint (specify the location to mount the cdrom). This mount point must be listed in /etc/fstab and properly configured. | ||
* '''-r''' or '''--rename''' : rename a disc; change the label of a disk or override the disks given label. This option will cause apt-cdrom to prompt for a new label. | * '''-r''' or '''--rename''' : rename a disc; change the label of a disk or override the disks given label. This option will cause apt-cdrom to prompt for a new label. | ||
第30行: | 第30行: | ||
=== See also === | === See also === | ||
* http://linux.die.net/man/8/apt-cdrom | * http://linux.die.net/man/8/apt-cdrom | ||
− | * [[UbuntuHelp:AptGet/Offline]] | + | * [[UbuntuHelp:AptGet/Offline|AptGet/Offline]] |
* [[UbuntuHelp:UpdateManager|UpdateManager]] | * [[UbuntuHelp:UpdateManager|UpdateManager]] | ||
* [[UbuntuHelp:PackageCDs|PackageCDs]] | * [[UbuntuHelp:PackageCDs|PackageCDs]] |
2008年10月19日 (日) 21:58的版本
You can use the Ubuntu Live Cd to install packages (i.e. to an older offline Ubuntu computer).
Source.list
If you have a new Live CD and the Live CD in the Source.list file, comment all the repositories excepting the CD and
sudo apt-get update sudo apt-get dist-upgrade
After upgrade, uncomment all the other repositories in the source.list file. Some computers can ask to use apt-cdrom. If so, follow the instructions that appears bellow.
Apt-cdrom
apt-cdrom can add a new CDROM to APTs sources.list file (list of available repositories). It is necessary to use apt-cdrom to add CDs to the APT system, it cannot be done by hand. Put the Live CD in the unit and use one of these commands, in this order :
- sudo apt-cdrom --no-act add (if everything is OK, then you can use sudo apt-cdrom add ).
- sudo apt-cdrom ident
- sudo apt-cdrom -d -r
Description and options
- add is used to add a new disc to the source list. It will unmount the CDROM device, prompt for a disk to be inserted and then procceed to scan it and copy the index files. If the disc does not have a proper .disk/ directory you will be prompted for a descriptive title. APT uses a CDROM ID to track which disc is currently in the drive and maintains a database of these IDs in /var/lib/apt/cdroms.list
- ident is a debugging tool to report the identity of the current disc as well as the stored file name.
- -d or --cdrom : MountPoint (specify the location to mount the cdrom). This mount point must be listed in /etc/fstab and properly configured.
- -r or --rename : rename a disc; change the label of a disk or override the disks given label. This option will cause apt-cdrom to prompt for a new label.
- -n, --just-print, --recon or --no-act: no Changes; Do not change the sources.list file and do not write index files. Everything is still checked however.
Test
After dist-upgrade you can test that everything is OK
sudo apt-get -f install sudo dpkg --configure -a