当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 4 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : HOWTO: Add SATA support for bootup ntfs mounting
帖子发表于 : 2005-07-31 15:46 

注册: 2005-05-07 23:57
帖子: 3025
送出感谢: 0 次
接收感谢: 0 次
I know I'm not the only one who has this type of config: ATA/133 drive hosting hoary, SATA drive hosting WinXP (On a Dell if you must know, so ATA/133 is considered master of this config.)

The problem:

When trying to mount /media/windowsC at bootup with the mountall script, an error message is received. This apparently happens because the SATA drive support is not loaded until *after* mountall is already ran.

In my situation, my regular ata drive is considered drive 0. my sata drive is considered drive 1. so ubuntu doesn't want to load support for drive 1 out of the box. this may not happen if the SATA drive is your primary drive. I think this only happens when your primary drive is PATA.

The fix:
Compile a custom kernel with support for SATA drives built in

OR

edit your /etc/mkinitrd/modules file and add these lines to the end:

Code:

ata_piix
libata
sd_mod
scsi_mod



now make a new init ramdisk

Code:

sudo mkinitrd -o /boot/initrd.img-<your version>.custom <your version>



Replace <your version> with your kernel version by using uname -r

After that is done, edit your grub menu list and add the custom ramdisk you just made:

sudo nano /boot/grub/menu.list

Change your first entry to have the ramdisk you just made. Viola!


For reference, here's my fstab, menu.lst, and modules file:

Code:

# /etc/mkinitrd/modules: Kernel modules to load for initrd.
#
# This file should contain the names of kernel modules and their arguments
# (if any) that are needed to mount the root file system, one per line.
# Comments begin with a `#', and everything on the line after them are ignored.
#
# You must run mkinitrd(:cool: to effect this change.
#
# Examples:
#
# ext2
# wd io=0x300
ata_piix
libata
sd_mod
scsi_mod



Code:

# menu.lst - See: grub(:cool:, info grub, update-grub(:cool:
# grub-install(:cool:, grub-floppy(:cool:,
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 3

## ## End Default Options ##

title Ubuntu, kernel 2.6.10-5-686-smp.custom
root (hd1,0)
kernel /boot/vmlinuz-2.6.10-5-686-smp root=/dev/hda1 ro quiet splash
initrd /boot/initrd.img-2.6.10-5-686-smp.custom
savedefault
boot

title Ubuntu, kernel 2.6.10-5-686-smp
root (hd1,0)
kernel /boot/vmlinuz-2.6.10-5-686-smp root=/dev/hda1 ro quiet splash
initrd /boot/initrd.img-2.6.10-5-686-smp
savedefault
boot

title Ubuntu, kernel memtest86+
root (hd1,0)
kernel /boot/memtest86+.bin
savedefault
boot

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
#title Other operating systems:
#root

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Professional
root (hd0,0)
savedefault
makeactive
chainloader +1


Code:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda1 / ext3 defaults,errors=remount-ro 0 1
/dev/hda5 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 ro,user,noauto 0 0
/dev/hdd /media/cdrom1 udf,iso9660 ro,user,noauto 0 0
/dev/sda1 /media/windowsC ntfs umask=0222 0 0
/dev/sda2 /media/windowsD ntfs umask=0222 0 0



Thanks to zerokarmaleft for all his help in figuring this out. Just wanted to post in case someone else runs into this situation.

http://ubuntuforums.org/showthread.php?t=30233


_________________
独自看一看大海
总想起身边走在路上的朋友
Lenovo E290-420[Celeron-M420/256M/60G/Intel GMA950]


页首
 用户资料  
 
2 楼 
 文章标题 :
帖子发表于 : 2005-08-01 12:56 

注册: 2005-07-06 18:01
帖子: 36
送出感谢: 0 次
接收感谢: 0 次
HOWTO:在启动时挂载NTFS文件系统的SATA(串行ATA)设备

我知道我并不是使用如下配置的第一人:ATA/133硬盘运行hoary,SATA(串行ATA)硬盘运行WinXP(你应该知道在Dell机上ATA/133被认为是主流配置)。

问题:

我想在启动的时候让挂载脚本自动挂载/media/windowsC,结果发生了错误。显然,这是因为挂载时还没有加载SATA的驱动。

根据我自己机器的实际情况,我的ATA硬盘被识别为硬盘驱动器0(drive 0),SATA硬盘被识别为硬盘驱动器1(driver 1)。这样,ubuntu系统就不想费事地去加载银盘驱动器1的驱动。如果SATA硬盘是你的主硬盘也许就不会这样了。我想上面的错误只有在你的主硬盘是PATA(并行ATA)的情况下才会发生。

解决方法:

为支持SATA硬盘重新编译一个适合的内核或者编辑你机器上的/etc/mkinitrd/modules文件,将下面的几行加入到结尾部分:

代码:
ata_piix
libata
sd_mod
scsi_mod


现在就可以建立一个新的初始化ramdisk(用内存虚拟硬盘)了:

代码:
sudo mkinitrd -o /boot/initrd.img-<your version>.custom <your version>


将<your version>换成你的内核版本号,你可以用uname -r命令获得这个版本号。

这些完成之后,编辑你的grub菜单项,加入你刚才定制的ramdisk:

代码:
sudo nano /boot/grub/menu.list


将你的第一个入口获得你刚才做的ramdisk。搞定!

作为参考这里提供了我的fstab文件内容、menu.lst和modules文件:

代码:
# /etc/mkinitrd/modules: Kernel modules to load for initrd.
#
# This file should contain the names of kernel modules and their arguments
# (if any) that are needed to mount the root file system, one per line.
# Comments begin with a `#', and everything on the line after them are ignored.
#
# You must run mkinitrd(:cool: to effect this change.
#
# Examples:
#
# ext2
# wd io=0x300
ata_piix
libata
sd_mod
scsi_mod



代码:
# menu.lst - See: grub(:cool:, info grub, update-grub(:cool:
# grub-install(:cool:, grub-floppy(:cool:,
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 3

## ## End Default Options ##

title Ubuntu, kernel 2.6.10-5-686-smp.custom
root (hd1,0)
kernel /boot/vmlinuz-2.6.10-5-686-smp root=/dev/hda1 ro quiet splash
initrd /boot/initrd.img-2.6.10-5-686-smp.custom
savedefault
boot

title Ubuntu, kernel 2.6.10-5-686-smp
root (hd1,0)
kernel /boot/vmlinuz-2.6.10-5-686-smp root=/dev/hda1 ro quiet splash
initrd /boot/initrd.img-2.6.10-5-686-smp
savedefault
boot

title Ubuntu, kernel memtest86+
root (hd1,0)
kernel /boot/memtest86+.bin
savedefault
boot

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
#title Other operating systems:
#root

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Professional
root (hd0,0)
savedefault
makeactive
chainloader +1


代码:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda1 / ext3 defaults,errors=remount-ro 0 1
/dev/hda5 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 ro,user,noauto 0 0
/dev/hdd /media/cdrom1 udf,iso9660 ro,user,noauto 0 0
/dev/sda1 /media/windowsC ntfs umask=0222 0 0
/dev/sda2 /media/windowsD ntfs umask=0222 0 0


感谢zerokarmaleft给我的帮助使我能解决这个问题。把这个贴出来也是因为还有其他的朋友遇到了和我同样的问题。


页首
 用户资料  
 
3 楼 
 文章标题 :
帖子发表于 : 2005-08-02 9:20 
论坛管理员

注册: 2005-03-27 0:06
帖子: 10110
系统: Ubuntu 12.04
送出感谢: 7
接收感谢: 127
http://www.ubuntu.org.cn/support/docume ... howto_view


_________________
当净其意如虚空,远离妄想及诸取,令心所向皆无碍


页首
 用户资料  
 
4 楼 
 文章标题 :
帖子发表于 : 2006-07-30 22:58 
头像

注册: 2005-07-02 14:41
帖子: 4133
系统: Ubuntu 14.04 (Kylin)
送出感谢: 53
接收感谢: 11
这个是5.04的
好像过时了
先放着


_________________
https://weakish.github.io


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 4 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 4 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译