LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-18-2009, 07:26 AM   #1
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 704

Rep: Reputation: 55
grub-install /dev/fd0 on unmounted floppy disk


Hi all...

I was studying a study material where its mentioned before installing grub on floppy disk...we have to unmount it...

My doubt is how unmounted file system is detected to install boot loader?

Code:
[root@lyrebird root]# umount /dev/fd0
umount: /dev/fd0: not mounted
[root@lyrebird root]# grub-install /dev/fd0
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.
Above after unmounting floppy drive..I dont understand how grub-install /dev/fd0 works ?

Can anyone help me please...

Thanks in advance......
 
Old 11-18-2009, 07:29 AM   #2
DaveQB
Member
 
Registered: Oct 2003
Location: Sydney, Australia.
Distribution: PCLinuxOS 2010.12, Debian Lenny
Posts: 396

Rep: Reputation: 38
grub-install sets up the device to be bootale with your current boot setup. It has many options that you can use to tell it all sorts. Have a read of the manual

man grub-install

That might shed some more light for you.
 
Old 11-18-2009, 07:36 AM   #3
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 704

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by DaveQB View Post
grub-install sets up the device to be bootale with your current boot setup. It has many options that you can use to tell it all sorts. Have a read of the manual

man grub-install

That might shed some more light for you.
Thanks for your reply DaveQB...

But my question is /dev/fd0 should me mounted at some mount point to execute grub-install command right ?

But in the above shown script in a study material they are trying to execute grub-install on unmounted floppy...how is this possible ?
 
Old 11-18-2009, 07:55 AM   #4
j1alu
Member
 
Registered: Apr 2009
Distribution: debian gnu/linux
Posts: 798

Rep: Reputation: Disabled
in this how-to:
http://sidux.com/index.php?module=Wikula&tag=GrubFloppy
you also umount the floppy before running the grub-shell.
not that it would answer your question *why* it is so or how it is possible, but it seems to be that way.

as long as it works
 
Old 11-18-2009, 07:59 AM   #5
DaveQB
Member
 
Registered: Oct 2003
Location: Sydney, Australia.
Distribution: PCLinuxOS 2010.12, Debian Lenny
Posts: 396

Rep: Reputation: 38
Programs can interact with the block level device, that's how they are mounted and the file system presented to you etc. Like dd can dump a whole drive into a binary file that you can mount, mounting the FS ontop of that to read it.

So grub deals with the superblock of the device, it does not need the file system to be mounted for this. In fact, better not to.
 
Old 11-18-2009, 08:35 AM   #6
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 704

Original Poster
Rep: Reputation: 55
Code:
grub-install '(fd0)'

Code:
# grub  
 grub> root (fd0)  
grub> setup (fd0)  
grub> quit
Here function of grub-install command
AND
setup (fd0) do same thing ??
 
Old 11-18-2009, 01:15 PM   #7
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,665

Rep: Reputation: 487Reputation: 487Reputation: 487Reputation: 487Reputation: 487
vinaytp,

Quote:
Here function of grub-install command
AND
setup (fd0) do same thing ??


Yes.
Grub command "setup" is safer to use than "grub-install" and both do the same thing at the boot sector. You did not need to mount the media because you are not reading any data from it: the system is going to perform something to the device, and it better stay as such.

To erase confusion a ten minute reading of this grub tutorial can greatly help you. Just read the topic you needed to know, but bookmark that page to easily return to it as need arises in the future.

Hope it helps.

Good luck.

Last edited by malekmustaq; 11-18-2009 at 01:18 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
grub - I/O error,dev fd0? vito_huang Linux - Software 5 02-24-2009 03:57 PM
/dev/fd0 gone! I can't mount floppy! robbow52 Debian 7 08-06-2004 05:35 PM
I have overwritten /dev/fd0! How do I recreate /dev/fd0 to access my floppy? drscott1 Linux - Newbie 2 02-19-2004 01:37 PM
Floppy at /dev/fd0 won't mount Borg Swarm Linux - Hardware 4 01-20-2004 07:48 PM
saving to floppy: overwrote /dev/fd0 davey Linux - General 2 11-28-2003 04:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration