LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 12-27-2006, 05:28 PM   #1
dtdionne
LQ Newbie
 
Registered: Dec 2006
Posts: 21

Rep: Reputation: 0
Advanced /dev/xxx mounting


Greetings,

I have what I thought was a image of a floppy driver disk, I tried fervently yet unsuccessfully to loop mount it. I put it in a floppy drive to see how the installer accessed it, thinking that it was going to mount it somehow but NO...it simply did the following:

tar -Zxf /dev/fd0 -C /

and BLAHM!

the contents of the floppy disk populated / with /lib and /bin.

I have 20 headless, floppyless, cdromless, pxe installs that NEED this driver disk...I have surgically injected these drivers into the initrd install image but I am guessing that since "it" (whatever "it" may be) didnt get them from /dev/fd0, that it doesnt know that they (the network drivers) are there and available. Therefore it continues to fail with the "CDROM not detected and no network drivers are available, press OK to reboot" failure message. While i could continue down this path of discovering who "it" is and telling "it" that the network drivers are there, the above example has intrigued me enough to want to investigate options in that direction first.

Now for my question...

Can I mount or hard/soft link a tarball to /dev/fd0?

I have tried the following to no avail:

ln -s /bootdisktwo/drivers.tar.gz/ /dev/fd0 --for which i get, /dev/fd0 exists or something, so then try

ln -sf /bootdisktwo/drivers.tar.gz/ /dev/fd0
--or--
rm -rf /dev/fd0
ln -s /bootdisktwo/drivers.tar.gz/ /dev/fd0 -- nothing happens and fd0 is gone until reboot

dd if=/bootdisktwo/drivers.tar.gz of=/dev/fd0 - cant remember, but it didnt work

dd if=/dev/zero of=poopoo count=1440
mkfs.vfat poopoo
mount -o loop /mnt/peepee poopoo
tar -Zxvf /bootdisktwo/drivers.tar.gz -C /mnt/peepee
umount poopoo
mount poopoo /dev/fd0 -- get some kinda "not a block device error"



So, once more...

Can I mount or hard/soft link a tarball to /dev/fd0? .... or any device for that matter

Last edited by dtdionne; 12-27-2006 at 05:31 PM.
 
Old 12-27-2006, 06:55 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Quote:
I have what I thought was a image of a floppy driver disk, I tried fervently yet unsuccessfully to loop mount it. I put it in a floppy drive to see how the installer accessed it, thinking that it was going to mount it somehow but NO...it simply did the following:

tar -Zxf /dev/fd0 -C /
I lost you right about here.
You had an image which you tried to loop mount, then you transferred that image to a floppy??

"To see how the installer mounted it" What installer?

"It did the following: tar, etc." What did that?? tar is a command that you would enter to make an archive.

Looking at the tar command it looks like whoever wrote it was telling the system to make a tar archive of the entire filesystem on the floppy. That would explain your observation of the various directories.

Last edited by pixellany; 12-27-2006 at 06:56 PM.
 
Old 12-27-2006, 11:26 PM   #3
dtdionne
LQ Newbie
 
Registered: Dec 2006
Posts: 21

Original Poster
Rep: Reputation: 0
wow, sorry....

Here is some background info:
1. I have 20 servers that do not have a floppy drive, a cdrom, nor a display card.
2. I need to install a special version of linux on them via pxe.

As with most versions of linux, this version has 2 boot floppy images in the images directory and another floppy image* containing drivers and it also has a cdrom boot image.

To kick off the installer you can either boot from the CDROM, put in the 1st boot floopy (after rawriting it to a floppy of course), or burn the cd boot image to a cd and boot from it.

Since my servers don't have anything but a network card to boot from, I have to boot from pxe and ive tried the following:

1. Boot the entire 70MB image - failed
2. Boot the cdrom installer image - partially works and this is what im looking for help with
3. Boot the floppy image - works but you can only kick off one image so it fails

The problem with the cd boot image is that it does not contain the network drivers and without the network drivers I can't continue and finish the install from the network.

The network drivers are on that third floppy image and my goal was too incorporate them into the cd boot image.

So step one would be to get the drivers off of the that last floppy image. In order to do that I naturally thought, mount it and copy them off. I was unable to mount it and I thought, well, why don't I kick off the install, switch to a virtual console and see how the hell the installer accesses this damn floppy...so on another computer I wrote the image to a floppy disk, left it in the drive and kicked off the install, switched to the virtual console with the monitor on it and thats when I saw how "the" which is also the "it" from my initial post, the installer accessed that floppy image, the installer did the following:

tar -xf /dev/fd0 -C /

which simply extracted whatever was on that floppy to the root partition.

So now armed with my newfound knowlege I was able to extract the network drivers and inject them into the boot cdrom but that didn't work...but since i do know that the installer gets them from /dev/fd0 i was thinking that if i could link/mount the tarball to /dev/fd0 everything would work...I have been unable to do that, so therefore that is what I have come here for help with.

Is it possible to mount or link a tarball to /dev/fd0?
 
Old 12-28-2006, 07:31 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
I guess I do not know how to read your tar command. Here are two snips from man tar:

Quote:
The final arguments to tar are
the names of the files or directories which should be archived.
The use of a directory name always implies that the subdirecto-
ries below should be included in the archive.

-C, --directory DIR
change to directory DIR
after reading this, I am not sure how to interpret tar <options> <pathname> -C <pathname>

This aside, this does not make sense:
Quote:
Is it possible to mount or link a tarball to /dev/fd0?
First, you do not mount files to devices. You mount devices to mountpoints (aka directories)

Second, you do not link anything to devices. Links are files that are created that point to other files/directories.
 
Old 01-02-2007, 09:48 AM   #5
dtdionne
LQ Newbie
 
Registered: Dec 2006
Posts: 21

Original Poster
Rep: Reputation: 0
Dude...your attitued is REALLY anoying!! SO STOP!!! On the other hand, if your goal is to run off good, smart, KIND, helpful, new members then YOUR RIGHT ON TRACK.

NOW LISTEN TO ME!!!!

I, ME, DAVID DIONNE, the guy posting this question and sitting at this keyboard DID NOT ISSUE OR EXECUTE THAT TAR COMMAND!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

THE SMOOTHWALL INSTALLER DID!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I was the first RHCE in Alabama so I am not a MORON as well I am also aware of the commonly held beliefs about mounting, mount points, links, etc...WHICH IS WHY I HAVE COME HERE TO POST A QUESTION ABOUT A FINDING I HAVE MADE that was interesting at the very least!
 
Old 01-02-2007, 10:32 AM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Don't understand....

I don't understand what the issue is here...Do you have additional questions?
 
Old 01-02-2007, 11:40 AM   #7
dtdionne
LQ Newbie
 
Registered: Dec 2006
Posts: 21

Original Poster
Rep: Reputation: 0
The issue is, as I have stated many times already:

I have 20 firewalls to install, the servers do not have floppies, cdroms, or displays. I have a fully functional PXE boot env and I am using the Smoothwall CD-Boot/install Image as the initrd image(please note that this image is not an ISO of the whole CD), but unfortunatly that image does not contain network drivers therefore the install fails before it is able to download the rest of the install via HTTP. The network drivers need to contine the install are on a floppy img, therefore I need to find a way to "inject"/mount/link them somehow.

Being the curious guy I am, I went to my ESX server and quickly created a new VM, mapped the floppy and kicked off a PXE install, then when the install got to the part where it asks for the network driver disk I switched over to the Alt-F2 virtual console to see how the installer used the floppy diskette, it was here that I noticed that the Smoothwall installer not bother with mounting the floppy, instead THE SMOOTHWALL INSTALLER, NOT ME, THE SMOOTHWALL INSTALLER did the following:

tar -xf /dev/fd0 -C /

which loaded the network drivers allowing the installer to continue by accessing the rest of the install located on an web server.

Now, seeing that "nugget" lead me here to see if there were any smart people that could revel in this with me and help me overcome my obstical or "issue" which I have re-re-re-stated in Paragraph I of this post.

Last edited by dtdionne; 01-02-2007 at 11:42 AM.
 
Old 01-02-2007, 12:45 PM   #8
Emerson
Senior Member
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~
Posts: 3,177

Rep: Reputation: Disabled
Hmh, did you try reading that floppy with dd into an image file named fd0 (there's probably no filesystem on that floppy, right?) and replacing /dev/fd0 device with that file?
 
Old 01-02-2007, 01:14 PM   #9
dtdionne
LQ Newbie
 
Registered: Dec 2006
Posts: 21

Original Poster
Rep: Reputation: 0
Hey Emerson, yeah I did...but I was unable to replace fd0 with the image, do you know how to do that exactly?
 
Old 01-02-2007, 01:24 PM   #10
Emerson
Senior Member
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~
Posts: 3,177

Rep: Reputation: Disabled
Sorry, I don't. I just felt I need to throw in my 2c after reading this thread. I have no Linux box here to experiment with.
 
Old 01-02-2007, 02:08 PM   #11
dtdionne
LQ Newbie
 
Registered: Dec 2006
Posts: 21

Original Poster
Rep: Reputation: 0
Ah...gocha, well thanks for the input, its good to know that someone else has had the same idea, hopefully its just a matter of getting the syntax right or something.
 
Old 01-02-2007, 02:53 PM   #12
Emerson
Senior Member
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~
Posts: 3,177

Rep: Reputation: Disabled
OK, i did ssh into a Linux box.

su -
lspci > fd0
cp fd0 /dev/fd0
less -f /dev/fd0

less displayed me the file correctly. This box has no floppy drive, so there was no /dev/fd0 to delete.
 
Old 01-02-2007, 07:24 PM   #13
kevkim55
Member
 
Registered: Dec 2005
Location: Edmonton
Distribution: BLFS, Gentoo
Posts: 353

Rep: Reputation: 32
What are these images ? File system images ? You can find that out by using the 'file' command on each of these images. If those are file system images then it should be possible to mount them on some mount points provided your kernel has the support for the type of file system those images are made of.

Quote:
dd if=/dev/zero of=poopoo count=1440
mkfs.vfat poopoo
mount -o loop /mnt/peepee poopoo
tar -Zxvf /bootdisktwo/drivers.tar.gz -C /mnt/peepee
umount poopoo
mount poopoo /dev/fd0 -- get some kinda "not a block device error"
You are creating a vfat filesystem on file poopoo and ... you've got me confused.

'mount -o loop /mnt/peepee poopoo' - This would mount /mnt/peepee (which is a directory if I'm not wrong) on poopoo (which is file system image) which, is not possible. It has to be the other way - 'mount -o loop poopoo /mnt/peepee'. Now, if you extract the contents of drivers.tar.gz file to /mnt/peepee, it should work.

Quote:
mount poopoo /dev/fd0 -- get some kinda "not a block device error"
poopoo is a 'file system image' file and for that matter you will have to loop mount it.

"not a block device error" - Again, make sure that the file poopoo contains a filesystem. Did the 'mkfs.vfat poopoo' command succeed ?

Last edited by kevkim55; 01-02-2007 at 07:26 PM.
 
Old 01-02-2007, 07:28 PM   #14
Emerson
Senior Member
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~
Posts: 3,177

Rep: Reputation: Disabled
Please read what OP wrote. Floppy is not mounted, it probably has no filesystem on it and is used as raw device.
 
  


Reply

Tags
dev, fd0, mount, tar, tarball


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Error, some other host already uses address XXX.XXX.XXX.XXX" mwbb_support Linux - Networking 5 01-20-2014 08:59 AM
smbclient -M xxx.xxx.xxx.xxx Doesnt Work DiscreetControl Linux - Networking 7 12-28-2007 10:50 AM
Problem getting connection with a DLink Router with IP 10.xxx.xxx.xxx kezira Fedora 9 11-28-2005 10:31 PM
Problem getting connection with a DLink Router after setting static IP 10.xxx.xxx.xxx kezira Linux - Networking 1 11-09-2005 10:27 PM
Host XXX.XXX.XXX.XXX is not allowed to connect to this MySQL server ocavid Linux - Newbie 2 03-16-2005 09:40 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration