satimis 发表于 2005-8-4 17:26:23

Problem on creating backup dis

Hi folks,

LFS 6.1
FC3 Host

Now held on Section 8.4. Making the LFS System Bootable
http://www.linuxfromscratch.org/lfs/view/stable/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
1+0 records in
1+0 records out
root:/sources/linux-2.6.11.12# dd if=/boot/grub/stage2 of=/dev/fd0 bs=512 seek=1
198+1 records in
198+1 records out

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

root:/sources# cat /etc/fstab# Begin /etc/fstab

# file systemmount-pointtype   options            dumpfsck
#                                                             order

/dev/hda6      /            ext3   defaults             1   1
/dev/hda3      swap         swap   pri=1                0   0
proc         /proc      proc   defaults             0   0
sysfs          /sys         sysfsdefaults             0   0
devpts         /dev/pts   devpts gid=4,mode=620       0   0
shm            /dev/shm   tmpfsdefaults             0   0
/dev/fd0       /mnt/floppyauto   noauto,owner,kudzu   0   0

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/
mount: /dev/fd0 is not a block device (maybe try `-o loop'?)

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

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
1+0 records in
1+0 records out
root:/sources/linux-2.6.11.12# dd if=/boot/grub/stage2 of=/dev/fd0 bs=512 seek=1
198+1 records in
198+1 records out

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

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


On another Konsole
# mount /dev/fd0 /mnt/floppy/
# ls -al /mnt/floppy/
total 21
drwxr-xr-x3 root root1024 Aug4 17:49 .
drwxr-xr-x7 root root4096 Jun 27 14:19 ..
drwx------2 root root 12288 Aug4 17:49 lost+found

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

How to test the backup floppy?

B.R.
satimis

blackwolf 发表于 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.

satimis 发表于 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

blackwolf 发表于 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 dd if=/dev/fd0 of=/boot/grub/stage1 bs=512 count=1
dd if=/dev/fd0 of=/boot/grub/stage2 bs=512 count=1

satimis 发表于 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

blackwolf 发表于 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:

   GNU GRUB version .....
.....

grub>

satimis 发表于 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

blackwolf 发表于 2005-8-8 10:25:20

Try it on another PC?

satimis 发表于 2005-8-8 10:46:58

Try it on another PC?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

blackwolf 发表于 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.

satimis 发表于 2005-8-8 11:28:55

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.....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

blackwolf 发表于 2005-8-8 11:45:03

Nothing. Just insert it into the floppy driver and dd... :-)

satimis 发表于 2005-8-8 11:50:16

Nothing. Just insert it into the floppy driver and dd... :-)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

blackwolf 发表于 2005-8-8 12:00:43

:-(:?::?::?::-(
页: [1] 2
查看完整版本: Problem on creating backup dis