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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-18-2009, 06:26 AM
|
#1
|
Member
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707
Rep:
|
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......
|
|
|
11-18-2009, 06:29 AM
|
#2
|
Member
Registered: Oct 2003
Location: Sydney, Australia.
Distribution: Debian, Ubuntu
Posts: 400
Rep:
|
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.
|
|
|
11-18-2009, 06:36 AM
|
#3
|
Member
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707
Original Poster
Rep:
|
Quote:
Originally Posted by DaveQB
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 ?
|
|
|
11-18-2009, 06:55 AM
|
#4
|
Member
Registered: Apr 2009
Distribution: debian gnu/linux
Posts: 798
Rep:
|
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
|
|
|
11-18-2009, 06:59 AM
|
#5
|
Member
Registered: Oct 2003
Location: Sydney, Australia.
Distribution: Debian, Ubuntu
Posts: 400
Rep:
|
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.
|
|
|
11-18-2009, 07:35 AM
|
#6
|
Member
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707
Original Poster
Rep:
|
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 ??
|
|
|
11-18-2009, 12:15 PM
|
#7
|
Senior Member
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669
|
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 12:18 PM.
|
|
|
All times are GMT -5. The time now is 10:32 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|