LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 07-06-2006, 11:15 AM   #1
bacall213
LQ Newbie
 
Registered: Jan 2005
Posts: 6

Rep: Reputation: 0
floppy image issue on old Sun


Hey folks,
I downloaded the SPARC floppy images for a Sun Sparcstation 2, and successfully loaded the first image to a floppy, but the second floppy image seems to be too big. No matter what I do, I can't get it to go to a floppy. Has anyone else encountered this? Does anyone have any suggestions or solutions? I am trying to install the lastest version of NetBSD (FTP install). Any help would be greatly appreciated!

Thanks,
Brian
 
Old 07-07-2006, 03:57 PM   #2
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
Hmm, I can see that it's about 37k bigger than the standard floppy size. Are you doing this from another *nix machine? If so, you can fix the problem by making your own image.

disk2 is actually a tgz archive. Here is what you can do to strip it down a little (note this has not been tried here as I don't have the system to test it on but it should work unless I am massively confused about the manner of installation).

Code:
mkdir disk2.fs
cd disk2.fs
cat ../disk2 | tar xzvpf -
rm sysinstmsgs.{de,es,fr,pl}
rm -rvf usr/share/zoneinfo/Antarctica*
rm -rvf usr/share/zoneinfo/Asia*
tar czvpf ../disk2.img .
And then write disk2.img as you would have the other image. Obviously, if you need the sysinstall messages in German, Spanish, French, or [I forget what .pl is]... you want to leave them. Same with the timezones... don't delete what you need for installation. If you live in Asia or Antarctica, then remove the American ones or something.

But you can trim down the image a little to make it fit, then recreate it.

I hope this works... it's a little ugly and crufty but it should shrink the image. I don't know what happened that this wasn't caught (or if there is another way to get this on a floppy without editing -- I haven't seen it) but this should work. Let me know if you have any questions or if something goes wrong.

Edit: The standard floppy size is 1440K (often called, incorrectly, 1.44M). The file disk1 is exactly 1440K when gunzipped. The disk2 image is roughly 1477.4K (1512893/1024). Ironically, this still wouldn't fit on a floppy if they really did hold 1.44M as it's slightly over. Anyway... I'm rambling. The above steps were able to get me an image safely under the 1440K limitation.

Last edited by frob23; 07-07-2006 at 04:06 PM.
 
Old 07-07-2006, 04:12 PM   #3
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
Note: If you're not on a *nix machine... it is possible for me to create this image for you and I could find a way to send it to you. This is absolutely the last resort as people you meet on forums are (unquestionably) untrusted sources. But if there is no other way... I'm willing to provide as much help as I can. [frob23 is a huge proponent of NetBSD and loves to show others how great it is.]

Also, it would have been better to bump your thread from 6/15 (http://www.linuxquestions.org/questi...d.php?t=455128) than to start another.

Last edited by frob23; 07-07-2006 at 04:41 PM.
 
Old 07-07-2006, 10:19 PM   #4
bacall213
LQ Newbie
 
Registered: Jan 2005
Posts: 6

Original Poster
Rep: Reputation: 0
frob23,
Thanks for the help. I actually do not have an operational *nix machine right now. I do however have quite an assortment of x86 compatible linux distros and a partition set aside for Linux. I'll install it and give what you suggested a try. If I can't, I'll repost and I'll take you up on your offer. Let me give it a try from Linux first.

As for this post... I didn't know you could "bump" a thread [to the top?]. I'm not terribly used to this forum, and as you can see from my profile, I haven't posted here much at all. Sorry about that.
 
Old 07-08-2006, 03:33 PM   #5
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
Quote:
Originally Posted by bacall213
frob23,
Thanks for the help. I actually do not have an operational *nix machine right now. I do however have quite an assortment of x86 compatible linux distros and a partition set aside for Linux. I'll install it and give what you suggested a try. If I can't, I'll repost and I'll take you up on your offer. Let me give it a try from Linux first.
I'm sure you'll be fine. Please post here if everything goes well, as well as if it doesn't. A simple, "That solved the problem and everything worked" is often enough to let other people know they should try it when they have the same problem.

Quote:
As for this post... I didn't know you could "bump" a thread [to the top?].
Yeah, on this system active threads jump back to the top when you (or anyone) post a response in them. It's not a major deal. I just thought I would let you know for later reference.
 
Old 07-09-2006, 09:10 PM   #6
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
Also, having just read your previous post... I notice you currently have NetBSD on the machine. If you have internet access, you can install from within the current system without booting from the floppies.

It's a little more technical... but not overly complicated. If, for some unexpected reason, the floppy thing doesn't work. I suggest you try that. I can help you with it... I've had to do it on a machine before (dead now) which had a bad floppy drive and no cd-rom drive.

Hopefully the disk thing works as you really should be comfortable on the NetBSD command line before doing an upgrade by hand.
 
Old 07-11-2006, 08:52 PM   #7
bacall213
LQ Newbie
 
Registered: Jan 2005
Posts: 6

Original Poster
Rep: Reputation: 0
Frob32,
I tried what you listed for updating the image and it seemed to work fine, except that there was an error uncompressing the /dev folder. In the end, it went back together just fine though. Unfortunately, my Sparcstation 2 disagreed with it:

Code:
Floppy device to load the installation utilities from [/dev/rfd0a]: /dev/rfd0a
Extracting installation utilities...
gzip: can't read stdin: Invalid argument
tar: End of archive volume 1 reached
tar: Unexpected EOF on archive file
tar: Sorry, unable to determine archive format.
Ejecting floppy disk
I'm not sure what went wrong, other than perhaps the image has something in it that checks the arhive expects a certain size for tamper-proof reasons.

If you don't think you can fix it, I'm up for trying a pre-redone image.

As for trying to do the upgrade from the OS, I'm not too familiar with this old NetBSD syntax (plenty familiar with modern linux, however). If you give me "play by play" directions, I could do it fine, but I am lacking in my knowledge of commands that would allow me to do it by concept directions.

Let me know what you think. Thanks for all your help!
 
Old 07-11-2006, 09:51 PM   #8
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
Did you run the commands as root or as a user? I had to run them as root to make them work because regular users can't usually make device nodes.

Anyway, moving on. The first thing you need to do is download all the sets for 3.0. Make sure you download them somewhere you can reach them in single user mode. Usually / if you have the room. /usr possibly, but you may be unable to mount other partitions... so be careful.

As root:
Don't execute things in {}'s and if you have questions... ask before you bork the system.
Code:
cd /
mv /netbsd /netbsd.16
tar xzvpf /path/to/netbsd-GENERIC.tgz
mkdir /new
cd /new
tar xzvpf /path/to/base.tgz
tar xzvpf /path/to/etc.tgz
{reboot into single user mode}
{if /bin/sh dumps (likely -- don't panic) tell it to use /new/bin/sh}
/new/sbin/mount /
/new/sbin/mount /usr  # repeat for all your mount points.
cd /
{!!! POINT OF NO RETURN !!!}
/new/bin/tar xzvpf /path/to/base.tgz
{repeat that for everything BUT etc.tgz}
/new/usr/sbin/postinstall -s /path/to/etc.tgz fix
{follow the directions given -- if there are any... sometimes it helps to run it twice.  This is the place you're most likely going to need to manually edit -- like add a group for example.}
/usr/sbin/etcupdate -s /new
{reboot into your new 3.0 system... rebuild all your packages for this new system as they're unlikely to work or will not work reliably}
Note: I have tried to make this as failure proof as possible... Once you reach the POINT OF NO RETURN, you're committed to upgrading... come hell or high water. The only way back from that point on is the installation disks from your previous version -- or some form of bootable media. Because if something goes wrong after this, it's likely you may not be able to fix it with what is on disk. Nothing should go wrong, and there's almost always a way to fix it if it does... but you need to be mentally prepared for that eventuality.

Also, in some cases, postinstall wanted you to point it to /new and not etc.tgz (but that's not the case with the new version... I'm pretty sure). In any case... it is verbose and you should be able to figure out what it wants.

Also, in some cases binaries have moved... for example /usr/bin/tar has moved to /bin/tar. Make sure you remove /usr/bin/tar -- if postinstall doesn't catch this. This will be rare. If you keep running a program and it fails because of a bad system call, this is what you check (to see if you have an old version laying around somewhere).

Questions? I know it's a lot.

Also, sometimes the etcupdate will fix the problems postinstall didn't get. So run that and then try postinstall again.

Last edited by frob23; 07-12-2006 at 12:23 AM.
 
Old 07-11-2006, 09:55 PM   #9
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
Okay... some failsafe information. If the new kernel won't boot. Stop the loader and tell it to use netbsd.16 (this is why we saved it). This is only if the kernel won't load far enough for you to get into single user mode. Once there we know the kernel is fine, and we just need to use the new programs or we run into problems.

Note: It's always best to use the full path e.g. /new/sbin/postinstall so we're sure we're not running the old tools.

Also, once you're sure everything is up and running fine... you can "rm -rf /new".

I have used this method to successfully downgrade systems (I had a crappy G3 which is dead now but several times I found the new kernels would panic in short order -- turns out it was the motherboard -- but the old ones would be okay). Downgrading is much harder, as the scripts aren't prepared for that so you end up doing a lot by hand and you're more prone to bad system calls... and it works for me. So I'm pretty confident that you'll be fine.

Last edited by frob23; 07-11-2006 at 09:58 PM.
 
Old 07-11-2006, 11:32 PM   #10
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
Note: If you want to get fancy (and look cool) try
Code:
/new/usr/bin/progress -f /path/to/set.tgz /new/bin/tar xzpf -
That will give you the nice looking progress bars you get when you actually install. It looks really cool, and gives you somewhat of an ETA, to do:
Code:
for file in `ls [b-c]*.tgz g*.tgz [m-x]*.tgz`
do
echo "Unpacking $file"
/new/usr/bin/progress -f $file tar xzpf -
done
This assumes your sets are in / and you want X as well. Of course, the rule of thumb here... is keep it simple. I've done these frequently and am very familiar with the commands and can type them correctly from experience. So you probably shouldn't play with that command but you might want to take a look at it later. It's pretty nice when you're unpacking large tarballs.

Now, you shouldn't need to reinstall the boot blocks but if you do I can walk you through that as well.

Last edited by frob23; 08-01-2006 at 11:04 PM.
 
Old 07-12-2006, 12:07 AM   #11
bacall213
LQ Newbie
 
Registered: Jan 2005
Posts: 6

Original Poster
Rep: Reputation: 0
Well, I redid the image cutdown again, and this time with absolutely no problems (working as root this time), but unfortunately it ends up with the exact same error as before. I'll try to find room to download the sets, and I'll give the upgrade a try from the OS. The kernel compiled right now doesn't have floppy support; I hope that won't be a problem. I started to download the sets for 1.4 (or 1.6, whichever is installed) so I could recompile the kernel with floppy support, but ran out of room. The HD is only 1 Gb. I'll give it a shot though!

I'll let you know how things go. Thanks!

Oh, one last thing... this is kind of embarassing, but what is the program/command for showing partition sizes/partition info and available space?
 
Old 07-12-2006, 12:43 AM   #12
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
You won't need floppy drive support. So don't worry about that.

The command to show free space and all that other stuff:
Code:
df -k
Note: the -h flag doesn't work in 1.6.x so you'll have to make sense of those numbers as best you can. This is in kilobytes... so all my numbers below are also in kilobytes.

If you're cramped for size, then you do it in parts. First only download the kernel you're going to need. Then, as a bare minimum, grab base.tgz and etc.tgz (total 24,124k).

If you can, grab: base.tgz etc.tgz comp.tgz games.tgz man.tgz misc.tgz text.tgz (total 62,700k). This will give you everything but X.

The X sets are 57,360k or everything (not counting the kernel) is 120,060k. Note: this isn't a major thing... it's about 117M

Note: If you do it in parts... keep track of what you've installed and just download the bits you haven't. You can delete the tgz files as soon as it's done.

base.tgz and etc.tgz unpacked are 71736k. So, not counting the kernel... you want at least 95860k free for those two sets. With the generic kernel unpacked... it's 99604k (note... delete the kernel tgz, as soon as you unpack it).

97M... Do you have it?

And if you have 191M (195,540k) you can download everything. Now, the system has grown a little... so give a couple megs growing room as it unpacks (not too much as most of the stuff will be removed as it's replaced so don't think you need twice as much free space as you're already using).

Unless you're really, really tight on space... the install shouldn't be a problem.
 
Old 07-12-2006, 02:33 PM   #13
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
Note: as of two hours from now, I will be leaving for my vacation. I will not have any access to the computer for at least 24 hours (drive time) and will have random access after that. You should have enough information to complete the upgrade without issue. If you have any questions, post them here and I will answer them as soon as possible but there may be a longer delay than usual.
 
  


Reply

Tags
netbsd, sparc



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
Problem with SUN 21-inch N3 - aka Samsung 1100DF - image warping gwp Linux - Hardware 2 01-26-2006 02:39 PM
Mounting floppy on Sun Ultra 10 liguorir Solaris / OpenSolaris 1 10-06-2004 01:51 PM
When booting off cd drive,sun java desktop wont recognise my floppy DSTROI General 1 05-15-2004 04:26 AM
Linux and Sun NIS issue.please help!!!!!!!!!! KoRiR Linux - Networking 1 04-28-2004 02:04 PM
sun JDK1.3 and Red Hat 7.1 (kernal issue?) boinkingwinkie Linux - General 2 07-18-2001 09:49 AM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 03:08 PM.

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
Open Source Consulting | Domain Registration