QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1943|回复: 17

Problem on creating backup dis

[复制链接]
发表于 2005-8-4 17:26:23 | 显示全部楼层 |阅读模式
Hi folks,

LFS 6.1
FC3 Host

Now held on Section 8.4. Making the LFS System Bootable
http://www.linuxfromscratch.org/ ... chapter08/grub.html

creating a GRUB boot floppy diskette as a backup

Having a blank vfat floppy on its drive
root:/sources/linux-2.6.11.12# dd if=/boot/grub/stage1 of=/dev/fd0 bs=512 count=1[code:1]
1+0 records in
1+0 records out[/code:1]
root:/sources/linux-2.6.11.12# dd if=/boot/grub/stage2 of=/dev/fd0 bs=512 seek=1[code:1]
198+1 records in
198+1 records out[/code:1]

In fact it did not copy the necessary files on the floppy

root:/sources# cat /etc/fstab[code:1]# Begin /etc/fstab

# file system  mount-point  type   options              dump  fsck
#                                                             order

/dev/hda6      /            ext3   defaults             1     1
/dev/hda3      swap         swap   pri=1                0     0
proc           /proc        proc   defaults             0     0
sysfs          /sys         sysfs  defaults             0     0
devpts         /dev/pts     devpts gid=4,mode=620       0     0
shm            /dev/shm     tmpfs  defaults             0     0
/dev/fd0       /mnt/floppy  auto   noauto,owner,kudzu   0     0[/code:1]

root:/sources/linux-2.6.11.12# ls /mnt/
floppy

I tried to mount the floppy without success
root:/sources/linux-2.6.11.12# mount -t vfat /dev/fd0 /mnt/floppy/[code:1]
mount: /dev/fd0 is not a block device (maybe try `-o loop'?)[/code:1]

Whether I have to format the floppy first with fs=ext3, the file system of LFS
# fdformat /dev/fd0
# mkfs.ext3 /dev/fd0

Please help.  TIA

Remark: the floppy and its drive were in good condition.  I have them tested on the FC3 Host.  Files can be copied to the floppy, retrieved thereafter and deleted.

B.R.
satimis
 楼主| 发表于 2005-8-4 17:59:52 | 显示全部楼层
Hi folks,

Further to my late posting, performed following steps

Started anther Konsole;
# fdformat /dev/fd0
# mkfs -t ext3 /dev/fd0

floppy formatted with file system = ext3 created


Then ran
root:/sources/linux-2.6.11.12# dd if=/boot/grub/stage1 of=/dev/fd0 bs=512 count=1[code:1]
1+0 records in
1+0 records out[/code:1]
root:/sources/linux-2.6.11.12# dd if=/boot/grub/stage2 of=/dev/fd0 bs=512 seek=1[code:1]
198+1 records in
198+1 records out[/code:1]

root:/sources/linux-2.6.11.12# mount /dev/fd0 /mnt/floppy/[code:1]
mount: you must specify the filesystem type[/code:1]
root:/sources/linux-2.6.11.12# mount -t ext3 /dev/fd0 /mnt/floppy/[code:1]
mount: /dev/fd0 is not a block device (maybe try `-o loop'?)[/code:1]

I was not allowed to mount the floppy here.  Why?


On another Konsole
[root@localhost ~]# mount /dev/fd0 /mnt/floppy/
[root@localhost ~]# ls -al /mnt/floppy/[code:1]
total 21
drwxr-xr-x  3 root root  1024 Aug  4 17:49 .
drwxr-xr-x  7 root root  4096 Jun 27 14:19 ..
drwx------  2 root root 12288 Aug  4 17:49 lost+found[/code:1]

It seems the backup diskette has been created ???  Am I right ?

How to test the backup floppy?

B.R.
satimis
回复

使用道具 举报

发表于 2005-8-5 08:54:20 | 显示全部楼层
After you ran "dd ...", you can not see any file in the floppy disk.
You can try to boot you computer by this floppy. If it work, you are successed.
回复

使用道具 举报

 楼主| 发表于 2005-8-5 16:49:15 | 显示全部楼层
Hi blackwolf,

Tks for your advice.

After you ran "dd ...", you can not see any file in the floppy disk.
You can try to boot you computer by this floppy. If it work, you are successed.
I tried the floppy disks already.  None of them can boot up neither the FC3 Host PC nor another FC2 PC.

I created 2 rescue floppy disks;
- one just formated without creating file system
- anther with ext3 created

I can read the 2nd one with "lost and found" on it.
B.R.
satimis
回复

使用道具 举报

发表于 2005-8-7 11:45:51 | 显示全部楼层
I'm sorry, these disks can't bootup your computer. they are only a backup of grub stage1 and stage2. they will be used when the grub in the harddisk is crashed, you can copy them back to the hard disk by [code:1]dd if=/dev/fd0 of=/boot/grub/stage1 bs=512 count=1
dd if=/dev/fd0 of=/boot/grub/stage2 bs=512 count=1[/code:1]
回复

使用道具 举报

 楼主| 发表于 2005-8-7 19:32:02 | 显示全部楼层
Hi blackwolf,

Tks for your advice.

these disks can't bootup your computer. they are only a backup of grub stage1 and stage2.............
Then how can I find out whether the floppy created will work?  I have several floppies created in this way.  I'm curious to know how to test them.

TIA

B.R.
satimis
回复

使用道具 举报

发表于 2005-8-8 09:39:20 | 显示全部楼层
when you are boot you PC with this floppy disk, you will get into the grub command prompt that look like:
[code:1]
     GNU GRUB version .....
.....

grub>
[/code:1]
回复

使用道具 举报

 楼主| 发表于 2005-8-8 09:52:09 | 显示全部楼层
Hi blackwolf,

when you are boot you PC with this floppy disk, you will get into the grub command prompt that look like.........]
Nothing.  The PC did not detect the floppy OR the floppy was empty.  The PC continued to boot according to the boot sequence;

Floppy -> CDRomm -> HD

If putting a LiveCD on CRom, it booted LiveCD.  Otherwise the PC booted HD.

B.R.
satimis
回复

使用道具 举报

发表于 2005-8-8 10:25:20 | 显示全部楼层
Try it on another PC?
回复

使用道具 举报

 楼主| 发表于 2005-8-8 10:46:58 | 显示全部楼层
[quote:55950bc8c8="blackwolf"]Try it on another PC?[/quote]Yes, already.

One floppy which has been run with

# mkfs -ext3 /dev/fd0
having content;
...
lost and found.
....

That means the "dd..." command working.  Other floppies only run with
# fdformat /dev/fd0
without creating filesystem can't be read.

B.R.
satimis
回复

使用道具 举报

发表于 2005-8-8 11:09:10 | 显示全部楼层
the dd command is copy the stage1 to the first sector of the floppy, and stage2 to the next sectors of the floppy. so you must not mkfs on the the floppy and fdformat /dev/fd0. and when dd is done, you can not mount this floppy disk because it has not filesystem created in it.
When the PC bootup, the first sector of the floppy(stage1) is loaded into memory and run, the stage1 will load the next sectors(stage2) and execute it. then the GRUB is running.
回复

使用道具 举报

 楼主| 发表于 2005-8-8 11:28:55 | 显示全部楼层
[quote:782f090ac6="blackwolf"]the dd command is copy the stage1 to the first sector of the floppy, and stage2 to the next sectors of the floppy. so you must not mkfs on the the floppy and fdformat /dev/fd0.....[/quote]Noted with thanks.

The floppies were taken from the shelves having not been used for prolonged time.  I supposed they were formated on M$Windows.  What shall I do on the floppy before running "dd..".   I'll try again.

Tks.

B.R.
satimis
回复

使用道具 举报

发表于 2005-8-8 11:45:03 | 显示全部楼层
Nothing. Just insert it into the floppy driver and dd... :-)
回复

使用道具 举报

 楼主| 发表于 2005-8-8 11:50:16 | 显示全部楼层
[quote:73efb9609b="blackwolf"]Nothing. Just insert it into the floppy driver and dd... :-)[/quote]Yes, I tried this option first.  The floppy created failed to boot on PC which jumped to boot CDRom/HD instead.  Then I tried to format it.

B.R.
satimis
回复

使用道具 举报

发表于 2005-8-8 12:00:43 | 显示全部楼层
:-(        :-(
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-10-6 16:45 , Processed in 0.097997 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表