debian系统中chroot错误[已解决]——不能用NTFS分区

最大的社区版本,Ubuntu的发源地
回复
头像
haoyihuan
帖子: 271
注册时间: 2009-06-11 13:37

debian系统中chroot错误[已解决]——不能用NTFS分区

#1

帖子 haoyihuan »

系统:
Linux squeeze 2.6.32-5-amd64 #1 SMP Sun May 6 04:00:17 UTC 2012 x86_64 GNU/Linux
chroot版本:
chroot (GNU coreutils) 8.5
看了N多帖子,还真有不少人用chroot。可是没有找到一个提到过这个问题。
W: Failure trying to run: chroot /media/documents/precise dpkg --force-depends --install /var/cache/apt/archives/base-files_6.5ubuntu6_amd64.deb /var/cache/apt/archives/base-passwd_3.5.24_amd64.deb
我也曾经在另一台电脑上成功过。

请教如何解决这个错误。

代码: 全选

sudo debootstrap precise /media/documents/precise/
I: Retrieving Release
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Checking component main on http://archive.ubuntu.com/ubuntu...
I: Validating adduser
I: Validating apt
……
I: Validating xz-utils
I: Validating zlib1g
I: Chosen extractor for .deb packages: dpkg-deb
I: Extracting adduser...
I: Extracting base-files...
……
I: Extracting zlib1g...
I: Installing core packages...
W: Failure trying to run: chroot /media/documents/precise dpkg --force-depends --install /var/cache/apt/archives/base-files_6.5ubuntu6_amd64.deb /var/cache/apt/archives/base-passwd_3.5.24_amd64.deb
chroot到该目录后执行错误的命令:
dpkg --force-depends --install /var/cache/apt/archives/base-files_6.5ubuntu6_amd64.deb /var/cache/apt/archives/base-passwd_3.5.24_amd64.deb
dpkg: warning: parsing file '/var/lib/dpkg/status' near line 27 package 'dpkg':
missing description
dpkg: warning: parsing file '/var/lib/dpkg/status' near line 27 package 'dpkg':
missing maintainer
dpkg: warning: parsing file '/var/lib/dpkg/status' near line 27 package 'dpkg':
missing architecture
dpkg: regarding .../base-files_6.5ubuntu6_amd64.deb containing base-files, pre-dependency problem:
base-files pre-depends on awk
awk is not installed.
dpkg: warning: ignoring pre-dependency problem!
(Reading database ... 38 files and directories currently installed.)
Unpacking base-files (from .../base-files_6.5ubuntu6_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/base-files_6.5ubuntu6_amd64.deb (--install):
symbolic link '/usr/share/doc/base-files/FAQ' size has changed from 20 to 6
Preparing to replace base-passwd 3.5.24 (using .../base-passwd_3.5.24_amd64.deb) ...
Unpacking replacement base-passwd ...
dpkg: base-passwd: dependency problems, but configuring anyway as you requested:
base-passwd depends on libc6 (>= 2.8); however:
Package libc6 is not installed.
Setting up base-passwd (3.5.24) ...
Errors were encountered while processing:
/var/cache/apt/archives/base-files_6.5ubuntu6_amd64.deb
查看/var/lib/dpkg/status的内容如下:
cat /var/lib/dpkg/status
Package: base-files
Status: install ok not-installed
Priority: required
Section: admin

Package: base-passwd
Essential: yes
Status: install ok installed
Multi-Arch: foreign
Priority: required
Section: admin
Installed-Size: 165
Maintainer: Colin Watson <[email protected]>
Architecture: amd64
Version: 3.5.24
Replaces: base
Depends: libc6 (>= 2.8)
Description: Debian base system master password and group files
These are the canonical master copies of the user database files
(/etc/passwd and /etc/group), containing the Debian-allocated user and
group IDs. The update-passwd tool is provided to keep the system databases
synchronized with these master files.

Package: dpkg
Status: install ok installed
Version: 1.16.1.2ubuntu7
上次由 haoyihuan 在 2012-06-03 13:51,总共编辑 5 次。
跑debian应该是有点搞头的吧。
头像
lxr1234
帖子: 721
注册时间: 2009-04-10 11:15
来自: 三民主义国国民权利省我的选择市中共下台镇

Re: debian chroot错误

#3

帖子 lxr1234 »

自己下载这个包放进去
强烈反对M$的ARM Secure Boot 锁定要求,大家请签名反对
http://www.fsf.org/campaigns/secure-boo ... cted-boot/
头像
鲍尔默
帖子: 162
注册时间: 2011-04-26 23:39

Re: debian chroot错误

#4

帖子 鲍尔默 »

换源重新来过。
另,这关 Debian 鸟事!
头像
haoyihuan
帖子: 271
注册时间: 2009-06-11 13:37

Re: debian chroot错误

#5

帖子 haoyihuan »

使用默认的源也是同样的问题。
跑debian应该是有点搞头的吧。
pmshou
帖子: 315
注册时间: 2012-05-05 20:21

Re: debian系统中chroot错误

#6

帖子 pmshou »

安装schroot吧,很好用的。
看我注册日期:从此告别WINDOWS!
头像
haoyihuan
帖子: 271
注册时间: 2009-06-11 13:37

Re: debian chroot错误

#7

帖子 haoyihuan »

鲍尔默 写了:换源重新来过。
另,这关 Debian 鸟事!
ubuntu 12.04 iso(32位)启动,安装debootstrap,然后chroot安装precise可以用。可是在debian就是不行,把precise的目录挂载到debian系统下也不能运行(挂载的是64位debian的/proc和/dev)。
跑debian应该是有点搞头的吧。
pmshou
帖子: 315
注册时间: 2012-05-05 20:21

Re: debian系统中chroot错误

#8

帖子 pmshou »

看我注册日期:从此告别WINDOWS!
头像
haoyihuan
帖子: 271
注册时间: 2009-06-11 13:37

Re: debian系统中chroot错误

#9

帖子 haoyihuan »

pmshou 写了:我的问题已经解决了:http://forum.ubuntu.org.cn/viewtopic.php?f=48&t=375690
看过,根本没有出现我提到的这个问题。我的问题出现在这一步:
sudo debootstrap precise /media/documents/precise/
你可能没有出现过我这种问题,系统是有了,部分功能可以用。但是最主要的是apt-get命令都不能用!
错误在(chroot进去后错误,无法安装base-files和base-passwd)——这是关键:

代码: 全选

W: Failure trying to run: chroot /media/documents/precise dpkg --force-depends --install /var/cache/apt/archives/base-files_6.5ubuntu6_amd64.deb /var/cache/apt/archives/base-passwd_3.5.24_amd64.deb
跑debian应该是有点搞头的吧。
头像
自由建客
帖子: 13468
注册时间: 2008-07-30 23:21
系统: Debian stable AMD64

Re: debian chroot错误

#10

帖子 自由建客 »

haoyihuan 写了:
鲍尔默 写了:换源重新来过。
另,这关 Debian 鸟事!
ubuntu 12.04 iso(32位)启动,安装debootstrap,然后chroot安装precise可以用。可是在debian就是不行,把precise的目录挂载到debian系统下也不能运行(挂载的是64位debian的/proc和/dev)。
这错误很是异常,根本让人无从下手。
另外,你挂载了 /sys 没有?
头像
haoyihuan
帖子: 271
注册时间: 2009-06-11 13:37

Re: debian系统中chroot错误

#11

帖子 haoyihuan »

/proc /dev /sys 挂载和不挂载都一样。
跑debian应该是有点搞头的吧。
头像
haoyihuan
帖子: 271
注册时间: 2009-06-11 13:37

Re: debian系统中chroot错误

#12

帖子 haoyihuan »

当我载另一个没有upgrade的squeeze系统中运行debootstrap是可行的。

不知道这是不是debootstrap的一个bug,还是因为我安装的一些软件与debootstrap冲突了?

:em20
跑debian应该是有点搞头的吧。
头像
自由建客
帖子: 13468
注册时间: 2008-07-30 23:21
系统: Debian stable AMD64

Re: debian系统中chroot错误

#13

帖子 自由建客 »

我也碰到了

代码: 全选

W: Failure trying to run: chroot /mnt/debian dpkg --force-depends --install /var/cache/apt/archives/base-files_6.0squeeze5_amd64.deb /var/cache/apt/archives/base-passwd_3.5.22_amd64.deb
滚到前面,看到

代码: 全选

W: Couldn't download package debianutils
很明显,这个包下载失败。不知为何会下载失败,但就地重来便可。
头像
haoyihuan
帖子: 271
注册时间: 2009-06-11 13:37

Re: debian系统中chroot错误

#14

帖子 haoyihuan »

问题似乎有点眉目了。
:em01
经过多次测试,基本上得出结论:不能把chroot的目录设为NTFS分区——跟debootstrap和chroot没有关系。

1、NTFS目录,不管是NTFS的根目录还是其子目录,都会出现该错误。
2、etx4目录,当然debian的系统就是安装载etx4文件系统上,不管是在根目录还是在其子目录都没有问题。

记得印象中“linux不能安装在fat和ntfs文件系统的分区中”——debootstrap和chroot逃不出的五指山。 :em06
跑debian应该是有点搞头的吧。
头像
自由建客
帖子: 13468
注册时间: 2008-07-30 23:21
系统: Debian stable AMD64

Re: debian系统中chroot错误

#15

帖子 自由建客 »

纯 ext4!显然是 debootstrap 的问题,包未下载成功,它竟然跳过!清除缓存,再次实验估计很容易重现。
回复