Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gentoo就是装不上
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index 中文 (Chinese)
View previous topic :: View next topic  
Author Message
zsskyler
n00b
n00b


Joined: 19 Dec 2004
Posts: 5

PostPosted: Tue Dec 28, 2004 4:11 pm    Post subject: gentoo就是装不上 Reply with quote

gentoo?唉,不记得装了多次少了,帮忙看看以下script有没有问题.
我是在vmware上面装的,硬盘分区没错,无论root是reiserfs或ext3都不行,以下脚本运行至step3以后出错,具体现象是无法进入root目录,我觉得很其怪.有时会多出一个带问号的 root? 的目录.

step1

Code:
echo "step1: mke2fs sda1"
mke2fs   /dev/sda1

echo "step2: mkswap sda2"
mkswap   /dev/sda2

echo "step3: swap on"
swapon   /dev/sda2

echo "step4: mke2fs sda3"
mke2fs -j /dev/sda3   #ext3
#mkreiserfs -f /dev/sda3

echo "step5: mount sda3"
mount   /dev/sda3 /mnt/gentoo

echo "step6: mkdir boot"
mkdir   /mnt/gentoo/boot

echo "step7: mount boot"
mount   /dev/sda1 /mnt/gentoo/boot

echo "Now date your system time!"


step2

Code:
echo "step1:goto mnt_gentoo>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
cd /mnt/gentoo/

echo "step2:tar athlon-xp.tar.bz2>>>>>>>>>>>>>>>>>>>>>>"
tar -xvjpf /mnt/cdrom/stages/stage3-athlon-xp-2004.3.tar.bz2

echo "step3:tar snapshots>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
tar -xvjf  /mnt/cdrom/snapshots/portage-20041022.tar.bz2 -C /mnt/gentoo/usr

echo "step4:mkdir portage_distfiles>>>>>>>>>>>>>>>>>>>>"
mkdir /mnt/gentoo/usr/portage/distfiles

echo "step5:copy distfiles>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
cp /mnt/cdrom/distfiles/* /mnt/gentoo/usr/portage/distfiles/

#nano   -w /mnt/gentoo/etc/make.conf
echo "step6:copy resolv.conf>>>>>>>>>>>>>>>>>>>>>>>>>>>"
cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf

echo "step7: mount proc>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
mount -t proc none /mnt/gentoo/proc

echo "step8: copy step file>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
cp /mnt/cdrom/step* /mnt/gentoo  #only needed if the step scripts have been put on the CD!

echo "Now you can run step3!"

echo "step9: chroot>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
chroot /mnt/gentoo /bin/bash


step3:
Code:
echo "step:env-update"
env-update && source /etc/profile

echo "step:set zoneinfo"
ln -sf /usr/share/zoneinfo/HongKong /etc/localtime

echo "step:set net"
nano -w /etc/fstab  #
echo tux > /etc/hostname
echo home.net > /etc/dnsdomainname
echo nis.home.net > /etc/nisdomainname
echo "192.168.1.1     tux.home.net       tux" >> /etc/hosts
echo "Have fun with Gentoo!
" >> /etc/issue
rc-update add domainname default
rc-update add numlock default
nano -w /etc/conf.d/net  #
rc-update add net.eth0 default
nano -w /etc/rc.conf  #
echo "Now you need to set your root password!"
passwd
echo "tts/0" >> /etc/securetty

echo "step:install log"
emerge metalog
rc-update add metalog default

#emerge xfsprogs  #if you've chosen to use xfs
#emerge reiserfsprogs  #if you've chosen to use reiserfs

emerge dhcpcd
echo "step:install genkernel"
emerge genkernel
emerge gentoo-dev-sources

echo "step:compile"
genkernel --menuconfig all

#emerge hotplug
#rc-update add hotplug default

echo "step:install grub"
cd /boot
ln -s . boot
emerge grub
echo "config Grub and reboot your computer"
echo "default 0
timeout 15
color cyan/blue white/blue
title=Gentoo Linux 2.6.9-r1
root (hd0,0)
kernel /boot/kernel-2.6.9-gentoo-r1 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/sda3 vga=791 splash=silent
initrd /boot/initrd-2.6.9-gentoo-r1" >> /boot/grub/grub.conf
nano -w /boot/grub/grub.conf #just to check
#grub



用中文回贴子吧,要是e文好我就不来中文版了.
谢谢.
Back to top
View user's profile Send private message
Hauser
l33t
l33t


Joined: 27 Dec 2003
Posts: 650
Location: 4-dimensional hyperplane

PostPosted: Tue Dec 28, 2004 4:43 pm    Post subject: Reply with quote

zsskyler wrote:
以下脚本运行至step3以后出错,具体现象是无法进入root目录,我觉得很其怪.有时会多出一个带问号的 root? 的目录.

你是指step3那個腳本還是什麼?
另外能不能再說清楚點在具體在哪步無法進入root?
_________________
AMD Athlon XP 2600+; 512M RAM;
nVidia FX5700LE; Hitachi 120Gb
2.6.9-nitro4, reiser4, linux26-headers+nptl

Do I like to compile everything?
Positive definite!
Back to top
View user's profile Send private message
zsskyler
n00b
n00b


Joined: 19 Dec 2004
Posts: 5

PostPosted: Tue Dec 28, 2004 5:12 pm    Post subject: Reply with quote

应该就是step3吧,因为至step2还是正确的
脚本运行完毕时打开grub.conf,文本内容为空,实际上根本不存在/boot/grub/这个目录.

还有以下一种情况:
我的脚本是在ue上编辑然后放在iso文件中,用livecd启动.
如果启动后按此操作:
Code:
mount /dev/cdrom /mnt/cdrom
cp /mnt/cdrom/step* /root
chmod u+x step1
chmod u+x step2
./step1
./step2
此时step2出错,提示tar找不到文件.此时同样出现root?的目录.我觉得脚本有问题.

后来我在chmod之前使用nano修改一下step1,然后保存退出,再chmod,这时step1就可以正确执行了.

由于同样出现带问号的无效目录,所以我把这个情况也说出来,你看是什么问题呢?有没有关联?

zsskyler
谢谢.
Back to top
View user's profile Send private message
Hauser
l33t
l33t


Joined: 27 Dec 2003
Posts: 650
Location: 4-dimensional hyperplane

PostPosted: Tue Dec 28, 2004 5:41 pm    Post subject: Reply with quote

zsskyler wrote:
应该就是step3吧,因为至step2还是正确的
脚本运行完毕时打开grub.conf,文本内容为空,实际上根本不存在/boot/grub/这个目录.

沒有/boot/grub/這個目錄說明grub沒有emerge好,你再chroot進去emerge grub,完了再修改grub.conf並執行grub。
zsskyler wrote:
我的脚本是在ue上编辑然后放在iso文件中,用livecd启动.
如果启动后按此操作:
Code:

mount /dev/cdrom /mnt/cdrom
cp /mnt/cdrom/step* /root
chmod u+x step1
chmod u+x step2
./step1
./step2

那時候,你是在/root裡嗎?執行腳本之前請用ls確認一下腳本的屬性。
_________________
AMD Athlon XP 2600+; 512M RAM;
nVidia FX5700LE; Hitachi 120Gb
2.6.9-nitro4, reiser4, linux26-headers+nptl

Do I like to compile everything?
Positive definite!
Back to top
View user's profile Send private message
zsskyler
n00b
n00b


Joined: 19 Dec 2004
Posts: 5

PostPosted: Wed Dec 29, 2004 4:34 am    Post subject: Reply with quote

我想grub没有装上只是一个表现,很可能在之前的步骤就有错了,今晚回去再检查一下.或者在step3我手动执行试一下.

此外,我想弱弱地问,我上面的脚本都正确吗? :oops:
Back to top
View user's profile Send private message
Fleta
n00b
n00b


Joined: 12 Dec 2004
Posts: 68

PostPosted: Wed Dec 29, 2004 7:29 am    Post subject: Reply with quote

zsskyler wrote:
此外,我想弱弱地问,我上面的脚本都正确吗? :oops:

好象是没什么问题啊。
Back to top
View user's profile Send private message
zsskyler
n00b
n00b


Joined: 19 Dec 2004
Posts: 5

PostPosted: Wed Dec 29, 2004 5:04 pm    Post subject: Reply with quote

step3我没有用脚本,而是敲命令行一句句运行,看起来一争都顺利,问题可能就是
脚本的问题了.
可是,当计算机重启时,最后出现以下错误
Code:
>>Mounting filesystems
Started device management daemon v1.3.25 for /dev
>>Determining root device...
>>Block device /dev/sda3 is not a valid root device...
>>The root block device is unspecified or not detected.
  Please specify a device to boot, or "shell" for a shell...
boot()::

我敲入 shell,结果如下

Code:
BusyBox v1.00-pre7 (2004.12.30-00:01+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
/bin/ash: can't access tty; job control turned off
/#
Back to top
View user's profile Send private message
Hauser
l33t
l33t


Joined: 27 Dec 2003
Posts: 650
Location: 4-dimensional hyperplane

PostPosted: Thu Dec 30, 2004 5:20 am    Post subject: Reply with quote

如果是用vmware裝別忘了將Device Drivers --> SCSI device support --> SCSI low-level drivers --> <*> BusLogic SCSI support 編進內核。
_________________
AMD Athlon XP 2600+; 512M RAM;
nVidia FX5700LE; Hitachi 120Gb
2.6.9-nitro4, reiser4, linux26-headers+nptl

Do I like to compile everything?
Positive definite!
Back to top
View user's profile Send private message
punkid
Apprentice
Apprentice


Joined: 18 Dec 2004
Posts: 215
Location: offline

PostPosted: Sun Jan 09, 2005 5:53 am    Post subject: 大家好。我是新手 Reply with quote

大家好,我是个gentoo linux 新手。我想请教一下大侠们几个问题,可能实际上是个很简单的问题,请赐教。
我想在step3中加入KDE的安装,应该加入哪些内容?
并且如何使KDE成为默认的启动方式啊?
谢谢。
_________________
My Blog | Latest Screenshot
Back to top
View user's profile Send private message
linky_fan
n00b
n00b


Joined: 01 Jan 2005
Posts: 33
Location: Shanghai China

PostPosted: Mon Jan 10, 2005 10:47 am    Post subject: Reply with quote

Code:

echo "step7: mount proc>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
mount -t proc none /mnt/gentoo/proc

你在mount proc之前好像没有mkdir /mnt/gentoo/proc
_________________
Be yourself!
Back to top
View user's profile Send private message
linky_fan
n00b
n00b


Joined: 01 Jan 2005
Posts: 33
Location: Shanghai China

PostPosted: Mon Jan 10, 2005 10:54 am    Post subject: Reply with quote

Code:

echo "default 0
timeout 15
color cyan/blue white/blue
title=Gentoo Linux 2.6.9-r1
root (hd0,0)
kernel /boot/kernel-2.6.9-gentoo-r1 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/sda3 vga=791 splash=silent
initrd /boot/initrd-2.6.9-gentoo-r1" >> /boot/grub/grub.conf

我觉得用echo没有用cat好. 如下
Code:

cat > /boot/grub/grub.conf << "EOF"
# Begin /boot/grub/grub.conf

# By default boot the first menu entry.
default 0

# Allow 30 seconds before booting the default.
timeout 30

# Use prettier colors.
color green/black light-green/black

# The first entry is for Gentoo.
title Gentoo Linux 2005.1
root (hd0,0)
kernel  /kernel root=/dev/sda3
EOF

_________________
Be yourself!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index 中文 (Chinese) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum