你查看的存档文件来自 - ubuntu category.

ubuntu 安装时提示“正在等待报头” waiting for headers

Posted 1 month, 3 weeks ago at 12:40 pm. 1 comment

可能是因为某次 update 或者apt-get install 时间太长被我中断的缘故,安装 sql 时总是报告 0% 正在等待报头…

本来以为是源的问题,但换了几个源都是如此。

sudo nautilus

找到 /var/cache/apt/archives 目录,删掉除了(partial目录的所有文件),重新 update 安装即可。

可能是因为不完整包的原因。

Popularity: 10% [?]

Tags:

grub 错误号码列表

Posted 2 months, 3 weeks ago at 11:37 am. 0 comments

1. Starting notes

Acknowledgements

Many thanks to Earthwings, penetrode, loyaltonone, pilla, airhead, nephros, yamakawa and all the others for the suggestions on the original thread.

Disclaimer warning

The examples provided are just examples. Be sure to change partition numbers and the like according to your systems specs. Follow the solutions provided by this document at your own risk.

2. Grub loading, please wait…

Situation

Code Listing 2.1: Grub output

GRUB loading stage 1.5
GRUB loading, please wait…

After this message, the system stops. If you attempt to boot the system using a grub floppy, the problem disappears.

Solution

According to The_Bell you could change the boot order in your BIOS.

Tell your BIOS to not boot from your floppy first.

penetrode wrote that this may also be due to bad CFLAGS settings. Although the current grub ebuild filters out -fstack-protector, it can’t hurt to recompile grub with clean CFLAGS if nothing else helps.

Code Listing 2.2: Using a clean CFLAG to rebuild GRUB

# CFLAGS=”-O2 -march=i686 -fomit-frame-pointer -pipe” emerge grub

3. Grub Error 12

Situation

Code Listing 3.1: Grub Output

12 : Invalid device requested.

This error is returned if the device strings syntax is correct but other than that, an error occurred that isn’t defined by any other error.

Solution

When you installed grub in your boot record using the interactive commands, did you execute the two lines below in the grub prompt?

Code Listing 3.2: Interactive installation commands

grub> root (hd0,0)
grub> setup (hd0)

(hd0,0) must be replaced with your boot partition and (hd0) with the HDD you have chosen. Remember that (hd0) will install the bootloader in the Master Boot Record of the first hard disk, the primary master.

4. Grub Error 15

Situation

This error can occur in two different stages of the GRUB configuration, either during the initial configuration (installing GRUB in the master boot record) or after booting the system and attempting to launch Linux (or any other entry).

Code Listing 4.1: Grub Output - Initial Configuration

grub> root (hd0,0)
Filesystem type is xfs, partition type 0×83

grub> setup (hd0)
Checking if “/boot/grub/stage1″ exists… no
Checking if “/grub/stage1″ exists… no

Error 15: File not found

Code Listing 4.2: Grub Output - Booting an Entry

Booting ‘gentoo Linux’

root (hd0,0)
Filesystem type is ext2fs, partition type 0×83
kernel (hd0,0)/boot/kernel-2.4.20 root=/dev/hda3 vga=792

Error 15: File not found
Press any key to continue…

Solution - Initial Configuration

This error is returned if the specified file name cannot be found, but everything else (like the disk/partition info) is OK.

Frequently, the error notes a missing kernel image file. Make sure that the file it is referring to exists on your boot partition.

To find out the exact name of your kernel, boot from the installation cd, mount your root and (if applicable) boot partition. Next, chroot into your Gentoo system and do a listing of the available files to see what kernel images you have available:

Code Listing 4.3: Verifying kernel image existence

# cd /boot
# ls

This will list all the kernels that you’ve got on your boot partition. If your kernel is missing make sure that you compiled a kernel (using genkernel or manually):

Code Listing 4.4: Recompile the kernel

# cd /usr/src/linux/
# make menuconfig
# make

And that you copied it to your boot partition:

Code Listing 4.5: Copying the kernel

# cp /usr/src/linux/arch/i386/boot/bzImage /boot

Verify that the name of the kernel is exactly the same as the one mentioned in your grub.conf file. Also make sure that the kernel line in your grub.conf file is referring to that partition (either explicitly or implicitly).

Another reported mistake is to have the BIOS ignore the disk on which the kernel or grub stages reside. Also, the partition on which grub stores its stages should not use a software RAID-5 (or other striping technology) configuration.

Solution - Booting an Entry

First, verify that the root and setup lines you have used are correct.

If you are certain they are valid, then you might be using a flawed GRUB version (0.93.20031222). Upgrade your Portage tree or mask this version of grub:

Code Listing 4.6: Masking Grub

(Execute this from within the chrooted environment)
# echo “=sys-boot/grub-0.93.20031222″ >> /etc/portage/package.mask
# emerge grub -p

You could also try to use the grub-install script as is recommended by the GRUB authors:

Code Listing 4.7: Using grub-install

(The –root-directory is needed if you are using a separate boot
partition,
otherwise you should leave it out)
# grub-install –root-directory=/boot /dev/hda

When all this fails, your boot partition may be corrupt. Check the partition for errors:

Code Listing 4.8: Checking a partition for errors

(Make sure the boot partition, /dev/hda1 in this case, is unmounted)
# fsck -y /dev/hda1

5. Grub Error 17

Situation

Code Listing 5.1: Grub Output

root (hd0,0)
filesystem type unknown partition type 0×7

Error 17 : Cannot mount selected partition

Solution

This error is returned if the partition requested exists, but the filesystem type cannot be recognized by GRUB.

Be sure to check your root(x,y) settings in your grub.conf.

Also, if you are trying to boot Windows, make sure that your grub.conf file has the root (hdX,Y) (or rootnoverify (hdX,Y)) and chainloader (hdX,Y)+1 in it.

6. Grub Error 18

Situation

Code Listing 6.1: Grub Output

kernel (hd1,4)/bzImage root=/dev/hdb7

Error 18: Selected cylinder exceeds max supported by BIOS

Solution

This error is returned when a read is attempted at a linear block address beyond the end of the BIOS translated area. This generally happens if your disk is larger than the BIOS can handle (512MB for (E)IDE disks on older machines or larger than 8GB in general).

Try an update for your BIOS and/or move your boot partition to the front (or at least into the appropriate range).

7. GRUB GRUB GRUB GRUB GRUB …

Situation

Code Listing 7.1: Grub Output

GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB
GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB

Solution

According to airhead this can be caused by having your bios detect your disks automatically. Try to set your bios entry to User Type HDD.

Another possibility is that you had Grub installed on your MBR and tried reinstalling it (for instance due to hard disk changes) but used the wrong setup and root commands.

8. Probing Devices to Guess BIOS Drives. This May Take a Long Time.

Situation

While trying to install grub, it hangs after displaying the following line:

Code Listing 8.1: Grub Output

# grub

Probing devices to guess BIOS drives. This may take a long time.

Solution

One reported cause was an exotic configuration of disk devices, like ultra/non-ultra DMA disks on one cable.

9. When Installing Grub, It Just Hangs

Situation

When installing grub, it hangs:

Code Listing 9.1: Grub Output

# grub
(At this stage, the installation stops)

Solution

If you haven’t got a floppy drive, have you used the –no-floppy switch?

Code Listing 9.2: Installing grub using the –no-floppy switch

# grub –no-floppy

10. Uncompressing Linux… Ok, booting the kernel.

Situation

The system hangs after displaying the following line:

Code Listing 10.1: Linux Output

Uncompressing Linux… Ok, booting the kernel.

Solution

Strictly speaking, this is no grub error. One possible cause is that ACPI is not working correctly but is enabled in the kernel. Try to disable it in your bios or in your kernel.

11. Grub Just Shows a Grub Prompt

Situation

When booting the system, you receive a grub prompt instead of a list of entries you have defined in your grub.conf file.

Solution

Mount your boot partition and verify if the grub/grub.conf file exists.

Code Listing 11.1: Mounting and verifying

# mount /dev/hda1 /mnt/gentoo/boot
# cat /mnt/gentoo/boot/grub/grub.conf

Also make sure that the menu.lst symbolic link exists:

Code Listing 11.2: Verifying the symbolic link

# ls -l /mnt/gentoo/boot/grub/menu.lst
lrwxrwxrwx 1 root root 9 Mar 7 14:00 /mnt/gentoo/boot/grub/menu.lst -> grub.conf

If not, recreate the symbolic link:

Code Listing 11.3: Recreating the menu.lst symbolic link

# cd /mnt/gentoo/boot/grub
# ln -snf grub.conf menu.lst

If this is the case, reinstall grub:

Code Listing 11.4: Reinstalling Grub

(Run from within the chrooted environment)
# grub-install –root-directory=/boot /dev/hda

12. Could Not Find Device For /boot/boot: Not Found Or Not a Block Device

Situation

When running grub-install during the GRUB installation, you receive the following error:

Code Listing 12.1: Grub Output

# grub-install –root-directory=/boot /dev/hda
Could not find device for /boot/boot: not found or not a block device

Solution

Check that you didn’t forget the following:

Code Listing 12.2: Updating the mtab file

# grep -v rootfs /proc/mounts > /etc/mtab

13. The System Reboots After Hitting Return At The Grub Menu

Situation

After hitting Return at the Grub menu during the system boot, the system reboots.

Solution

Try disabling framebuffer support in your kernel. If this does not help, disable APM and ACPI.

14. After Hitting Return At The Grub Menu, The Screen Blanks Out

Situation

After hitting Return at the Grub menu during system boot, the screen blanks out, but the system is responsive (for instance, your numlock led is switcheable).

Solution

Turn off framebuffer (typically remove vga=XYZ from your grub.conf) and check the processor architecture in your kernel config.

15. Missing Grub Image

Situation

When booting the system, you do not see that spify Gentoo splashscreen.

Solution

First of all check if the splashscreen file you are referring to in your grub.conf really exists. If that is the case, go and check the grub ebuild. Maybe the patch for the splash image is commented out in the version that you are using.

16. Failing To Boot Windows From a Second Harddrive

Situation

After selecting the Windows entry, the system refuses to boot without any clear reason as to why.

Solution

cyrillic informed us that you can “map” your disks in a different order by changing your grub.conf’s Windows entry like so:

Code Listing 16.1: Mapping disks

title Windows XP
map (hd0) (hd1)
map (hd1) (hd0)
chainloader (hd1,0)+1

17. Grub segfaults when trying to install

Situation

The situation described below is only relevant for grub-0.95.x at the moment of installing grub at the boot sector.

Code Listing 17.1: Installing Grub

grub> root (hd0,0)

grub> setup (hd0)

Segmentation fault

Solution

This is a known bug related to this problem and has been fixed in grub 0.96. It is also known that grub 0.94 r1 and grub 0.94 r2 should work correctly. If that fails too, you can try to emerge grub-static which is currently stable on amd64 and unstable on x86 (~x86). Check out bug #79378 for additional information.

Popularity: 17% [?]

Tags:

PROC 文件系统工具

Posted 3 months ago at 3:31 pm. 0 comments

proc 并非真正的文件系统,而是内核提供其进程表中的项目状态的方式 (例如,运行、停止或“僵死”)。软件包提供命令行和全屏界面工具,其中全屏工具需要 Ncurses。procps 的网站 http://procps.sf.net/ 上可以找到更多信息。

本软件包包括以下工具:top、uptime、tload、free、vmstat、watch、skill、pmap、 pgrep、slabtop 和 pwdx。

Popularity: 16% [?]

No tag for this post.

linux shell cheatsheet 和 ubuntu cheat sheet

Posted 3 months, 1 week ago at 3:45 pm. 0 comments

都是一些基本的 linux shell 和 ubuntu 常用的一些命令。

http://fosswire.com/2008/04/22/ubuntu-cheat-sheet/
http://fosswire.com/2007/08/02/unixlinux-command-cheat-sheet/

Popularity: 18% [?]

No tag for this post.

MintLinux from celena to elyssa

Posted 3 months, 1 week ago at 3:11 pm. 0 comments

先升级到 daryna,步骤如下:
Change your APT sources

Edit the sources.list as root (sudo gedit /etc/apt/sources.list) to make it look like this:

## ———————–
## LINUX MINT REPOSITORIES
## ———————–

## +++ Daryna (Linux Mint 4.0) +++
deb http://www.linuxmint.com/repository daryna main upstream import
## deb http://www.linuxmint.com/repository daryna community
## deb http://www.linuxmint.com/repository daryna backport

## +++ Romeo (Linux Mint Unstable) +++
## deb http://www.linuxmint.com/repository romeo daryna

## +++ Source Repositories +++
## deb-src http://www.linuxmint.com/repository daryna main upstream import
## deb-src http://www.linuxmint.com/repository daryna community
## deb-src http://www.linuxmint.com/repository daryna backport
## deb-src http://www.linuxmint.com/repository romeo daryna

## ——————-
## UBUNTU REPOSITORIES
## ——————-

## +++ Gutsy (Ubuntu 7.10) +++
deb http://archive.ubuntu.com/ubuntu gutsy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu gutsy-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu gutsy-security main restricted universe multiverse

## +++ Backports & Proposed (Ubuntu Unstable) +++
#deb http://archive.ubuntu.com/ubuntu gutsy-backports main restricted universe multiverse
#deb http://archive.ubuntu.com/ubuntu gutsy-proposed main restricted universe multiverse

## +++ Source Repositories +++
#deb-src http://archive.ubuntu.com/ubuntu gutsy main restricted universe multiverse
#deb-src http://archive.ubuntu.com/ubuntu gutsy-updates main restricted universe multiverse
#deb-src http://security.ubuntu.com/ubuntu gutsy-security main restricted universe multiverse
#deb-src http://archive.ubuntu.com/ubuntu gutsy-backports main restricted universe multiverse

## ——————
## OTHER REPOSITORIES
## ——————

## +++ Canonical +++
deb http://archive.canonical.com/ubuntu gutsy partner

## +++ Medibuntu +++
deb http://packages.medibuntu.org/ gutsy free non-free
Change your APT preferences

Edit/Create the APT preferences file as root (sudo gedit /etc/apt/preferences) to make it look like this:

Package: *
Pin: release o=linuxmint
Pin-Priority: 700

Package: *
Pin: release o=Ubuntu
Pin-Priority: 500
Clean up

Run the following commands:

apt update
gconftool-2 –type int –set /apps/metacity/general/num_workspaces 4
gconftool-2 –type int –set /apps/compiz/general/screen0/options/hsize 4
gconftool-2 –type string –set /apps/compiz/plugins/cube/screen0/options/color 000000ff
apt install libpam-gnome-keyring
apt purge envy
apt clean
apt install envy mintdesktop mintinstall mintupdate mintwifi
apt purge compizconfig-settings-manager python-compizconfig
apt install compiz compiz-core compiz-gnome compiz-plugins gnome-screensaver gnome-system-monitor

elyssa 至少今天还是rc2,可能的办法是修改 /etc/apt/sources.list 把 celena 都改成 elyssa,然后

apt-get update
apt-get upgrade
apt-get dist-upgrade

官方还未给出升级办法

http://www.linuxmint.com/rel_elyssa.php

Popularity: 17% [?]

Tags:

Grub 和 LILO 区别

Posted 3 months, 1 week ago at 2:59 pm. 0 comments

Linux下最常用的多重启动软件就是LILO和Grub。

LILO是现在许多Linux缺省的引导程序,它的全称是Linux Loader,拥有很强大的功能。Grub 也是一个多重启动管理器,它的全称是Grand Unified Bootloader。Grub的功能与LILO一样,也是在多个操作系统共存时选择引导哪个系统。它可以引导很多PC上常用的操作系统,其中就有Linux、FreeBSD、Solaris、Windows 9x、Windows NT;可以载入操作系统的内核和初始化操作系统;可以把引导权直接交给操作系统来完成引导;可以直接从FAT、minix、FFS、ext2或ext3分区读取Linux内核。Grub 有一个特殊的交互式控制台方式,可以手工装入内核并选择引导分区。

初识Grub和LILO

1.Grub与LILO的优缺点

由于Grub出现要比LILO晚,所以它可以实现LILO的绝大部分功能,可以代替LILO来完成对Linux的引导,特别适用于Linux与其它操作系统共存情况。

8.4GB问题

以前大多数Linux所带较旧版本的LILO都有这样的一个问题:启动/boot分区不能分在超过1023柱面的地方,一般是在8.4GB左右的地方,否则 LILO不能安装,或者安装后不能正确引导系统。Grub就不会出现这种情况,只要安装时大硬盘是在LBA模式下,它就可以引导根分区在8GB以外的操作系统。目前,在LILO较新的版本中这个问题已经做了很好处理。

漂亮的Logo

Grub引导开机显示一个漂亮的开机画面,它可以是640×480、800×600、1024×768等各种模式画面, 而且可以支持自动选择最佳图像模式。Linux爱好者可以通过改变这幅图片来制作个性化开机画面。

LILO源于文字界面,因此它在最新的版本中对开机画面的支持也是很有限的。

执行模式

Grub 不但可以通过配置文件进行引导,还可以在选择引导前动态改变引导参数,动态加载各种设备。例如,在Linux下编译了一个新的核心,但不能确定它能不能工作,就可以在引导时动态改变Grub的参数,此时即使Grub菜单配置不正确,但仍可以引导系统。Grub的命令行有非常强大的功能,而且支持如bash 一样的历史功能,可以用上下键来寻找以前的命令。LILO就不支持这种模式。

在LILO下,既可以手工输入操作系统的名字来引导不同的操作系统,也可使用一个菜单来选择不同的系统进行引导。Grub也兼容以上的操作。

分区对Grub与LILO的影响

LILO 是通过读取硬盘上的绝对扇区来装入操作系统,因此每次分区改变都必须重新配置LILO,如果调整了分区的大小及分区的分配,那么LILO在重新配置之前就不能引导这个分区的操作系统了。而Grub是通过文件系统直接把核心读取到内存,因此只要操作系统核心的路径没有改变,Grub就可以引导系统。

Grub和LILO支持多种外部设备,支持多种文件系统,动态装载操作系统内核,甚至可以通过网络装载操作系统核心。Grub还支持多种可执行文件格式,支持自动解压,可以引导不支持多重引导的操作系统等。

Popularity: 16% [?]

No tag for this post.

安装使用 ubuntu 8.04 的几个体会

Posted 4 months ago at 7:36 pm. 0 comments

ubuntu 8.04 出来一些天了吧,我不是升级而是全新安装(原来的mintLinux已经被我使用得支离破碎了),个人体验如下:

1.安装8.04 中文,默认是 firefox 3.0 beta 繁体,比较郁闷,大部分 firefox addons 无法安装。google 也是直奔 .tw,不是很爽。
2.我的无线网卡直接就装好了,不用再自己去找了。
3.以前笔记本插上耳机,喇叭也出声音的问题解决了。
4.直接加入了 compiz 等视觉效果,打开很方便。
5.很多商业、版权软件的也至少给出了一些提示、向导。是啊,你可以卖菜刀,但你不能决定人家是否用来砍人。
6.默认貌似就是wqy黑体,还可以,虽然我还是装了 wqy宋体。
7.死机多了。一周之内,dosbox 玩游戏死机3次,浏览器死机2次,是那种完全的死机,难道我的本本主板又快不行了?但此期间,mintlinux 或者 windows 都没有死机。
8.原来hp笔记本特有的插上DC电源启动,就没有声音的问题似乎也解决了。

人总是要向前看,不管你愿不愿意,这个世界不会停下开等你。8.04总得来说还不错…

Popularity: 14% [?]

No tag for this post.

同步windows和ubuntu下firefox的配置文件

Posted 4 months ago at 7:00 pm. 0 comments

办法一:

lifehack 说了个<a href=”http://lifehacker.com/software/hack-attack/sync-your-firefox-extensions-and-profiles-across-computers-272113.php”>Sync your Firefox extensions and profiles across computers</a>

用 firefox 的 FolderShare 插件把配置文件放在一个固定的地方,然后win和ubuntu下的firefox都去读这个配置。

办法二:

还有人 <a href=”http://lxjunkie.blogspot.com/2008/01/making-firefox-portable-even-more.html”>Making Firefox Portable Even More Portable</a> 这样搞:

firefox -ProfileManager

建立一个新的配置文件,然后

ln -s /home/[username]/.mozilla/firefox/profiles/[profname] [path to firefox portable install]/Data/profile

把这个配置文件和windows下的 portable firefox 做个符号连接。

这样,两边(win下或者ubuntu下使用firefox,配置文件也是同步的)

办法三:

我老人家临时的办法,直接

wine firefoxPortable所在目录/FirefoxPortable.exe

还没有长时间使用,可能会有问题,毕竟是wine啊。

Tags:

Popularity: 16% [?]

Tags: ,

Ubuntu的5个技巧

Posted 5 months ago at 8:45 pm. 0 comments

安装 mp3,解码器和 java,flash插件

sudo apt-get install ubuntu-restricted-extras

安装 w32codecs

http://phorolinux.com/how-to-install-non-free-multimedia-codecs-on-ubuntu-710-gutsy-gibbon.html

安装 CompizConfig Settings Manager

sudo apt-get install compizconfig-settings-manager

安装 Opera 9.24

If you’re want to install Opera 9.24, you can use commercial repository for Ubuntu 7.10.

sudo gedit /etc/apt/sources.list

Add this line:

deb http://archive.canonical.com/ gutsy partner

After save file, run these commands:

sudo apt-get update
sudo apt-get install opera

ubuntu 系统清理

sudo apt-get autoclean
sudo apt-get clean

或者

sudo apt-get autoremove

Tags:

Popularity: 18% [?]

No tag for this post.

用 PlayOnLinux 玩 Windows 游戏

Posted 5 months ago at 8:16 pm. 0 comments

PlayOnLinux,Python编写的开源前端脚本,可以帮助你安装和玩上许多 Windows-only游戏。PlayOnLinux的核心就是Wine,但Wine是命令行程序,而PlayOnLinux则以图形化界面让你更易于 操作各种选项。PlayOnLinux还提供许多游戏脚本仓库,让游戏安装更轻松。

Tags:

Popularity: 20% [?]

No tag for this post.

ad 468x60