Moxa DA-681-I-SP-LX [21/65] Inserting a sata hard drive into the computer

Moxa DA-681-I-DP-XPE [21/65] Inserting a sata hard drive into the computer
DA-681 Linux Software Configuration
2-10
1. Write a shell script named fixtime.sh and save it to /home/.
#!/bin/sh
ntpdate time.nist.gov
hwclock –w
exit 0
2. Change mode of fixtime.sh
# chmod 755 fixtime.sh
3. Modify /etc/crontab file to run fixtime.sh at 8:00 every day.
Add the following line to the end of crontab:
* 8 * * * root /home/fixtime.sh
Inserting a SATA Hard Drive into the Computer
The DA-681 offers one hard drive connector supporting a SATA-based disk that can be added to the computer.
Follow the next step.
1. Change the access right of the file system mount o remount,rw /dev/hda1 /
Then use mount command to check if the status has been changed from read only to read and write.
Moxa:~# mount
rootfs on / type rootfs (rw)
none on /sys type sysfs (rw)
none on /proc type proc (rw)
udev on /dev type tmpfs (rw)
/dev/hdal on / type ext2 (ro)
/dev hdal on /dev/.static/dev type ext2 (ro)
tmpfs on /dev shm type tmpfs (rw, nosuid, nodev)
devpts on /dev/pts type devpts (rw, nosuid, noexec)
none on /temp type tmpfs (rw)
/dev/mtdblock0 on /home type jffs2 (rw)
Moxa:~# mount -0 remount, rw /dev/hda1 /
Moxa:~# mount
rootfs on / type rootfs (rw)
none on / sys type sysfs (rw)
none on / proc type proc (rw)
udev on /dev type tmpfs (rw)
/dev/hda1 on / type ext2 (rw)
/dev/hda1 on /dev/.static/dev type ext2 (rw)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec)
none on /tmp type tmpfs (rw)
/dev/mtdblock0 on /home type jffs2 (rw)
Moxa:~#
2. Edit /boot/grub/menu.lst.
Change the device name of DOM, from root=/dev/hda => root=/dev/sdb, and then save the file.
title Debian GNU/Linux, kernel 2.6.18-5-686
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-5-686 root*/dev/sdb1 ro
initrd /boot/initrd.img-2.6.18-5-686
savedefault

Содержание

Похожие устройства

Скачать