Having difficulty unpacking a tar.gz in RedHat! (updated!)

Migroo

Diamond Member
Jul 14, 2001
4,488
9
81
Having a bit of trouble unpacking this tar.gz in Red Hat
I have followed Electrode's instructions on unpacking a file. I gat farther than I had previously but the system still generated an error.

Heres a copy of the proceedings:

[root@linuxpc root]# tar xzvf flash_linux.tar.gz

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error exit delayed from previous errors


Can anyone give me any pointers? Many thanks :)
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Redownload the file. It apppears to be corrupted or not complete. Just my guess anyhow.
 

Sunner

Elite Member
Oct 9, 1999
11,641
0
76
n0c's advice seems like the best thing to do, but if you feel like it, you could always do "gunzip -t filename.tgz" to do an integrity test of the file first.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: Sunner
n0c's advice seems like the best thing to do, but if you feel like it, you could always do "gunzip -t filename.tgz" to do an integrity test of the file first.

/me mans gunzip

:D

EDIT: Im tired, so Im thinking I have to spell it out, Thanks Sunner, I didnt know about that option and it could have come in handy several times recently :)
 

Migroo

Diamond Member
Jul 14, 2001
4,488
9
81
Thanks guys!

I re-downloaded the tar.gz and it was easy sailing from there on. Much appreciated :)
 

Migroo

Diamond Member
Jul 14, 2001
4,488
9
81
Guys, any idea how I can install a patch.gz? Do you even install it or is it some kind of driver patch?

I'm trying to get my Adaptec SCSICard 29160 (and HP Surestore Dat40 tape drive) working. Adaptec have the drivers on their site (I have the correct ones for my distro/kernel)

Adaptec gives the following install procedure:

Patch Installation: To install via the patch method, download the patch file from the driver version/kernel version matrix below. The patch can be installed with the following command:

cd /usr/src/my_linux_tree && gzcat PATCHFILE.gz ¦ patch -p1

Trouble is I dont know what the variables are in that sentence! Can anyone give a hand?


 

manly

Lifer
Jan 25, 2000
12,767
3,564
136
Originally posted by: Migroo
Guys, any idea how I can install a patch.gz? Do you even install it or is it some kind of driver patch?

I'm trying to get my Adaptec SCSICard 29160 (and HP Surestore Dat40 tape drive) working. Adaptec have the drivers on their site (I have the correct ones for my distro/kernel)

Adaptec gives the following install procedure:

Patch Installation: To install via the patch method, download the patch file from the driver version/kernel version matrix below. The patch can be installed with the following command:

cd /usr/src/my_linux_tree && gzcat PATCHFILE.gz ¦ patch -p1

Trouble is I dont know what the variables are in that sentence! Can anyone give a hand?
Are you sure Red Hat Linux doesn't support that SCSI controller?

If not, then basically what you're doing is adding Adaptec's source code to the kernel source tree. Then, you'd configure the kernel, compile the kernel, and then compile kernel modules (including the Adaptec source code). Afterward, you'd install the new kernel and modules. That's a birds-eye level of the process.

For starters, you'd need the kernel-source package, which Red Hat Linux provides. Consult the documentation at redhat.com for specific instructions on how to compile a modularized kernel for Red Hat Linux (or numerous other sites on the Web for the same information).

Yes, this is a PITA compared to installing drivers in Windows operating systems. So before you begin, make sure you actually need to do it.
 

Migroo

Diamond Member
Jul 14, 2001
4,488
9
81
I'm pretty sure that Red Hat does support the card. Trouble is I try the command listed above and get the error:

bash: gzcat: command not found


... What to do! (RedHat definately supports the device as Adaptec have a massive series of patches, one for each kernel version)
 

manly

Lifer
Jan 25, 2000
12,767
3,564
136
No, you misunderstand.

What I mean is does Red Hat Linux already support that card out-of-the-box without compiling anything yourself?

I'm not sure but I believe a working substitute for gzcat would be gunzip -c.
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
RH should almost certainly support the Adaptec without any additional help.

If there's no gzcat on your system, try zcat instead.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
cd /usr/src/my_linux_tree && gzcat PATCHFILE.gz ¦ patch -p1

cd /usr/src/my_linux_tree
This will change you to the directory you have the kernel source installed.

&&
This tells the shell to perform the previous task and if it completes without error continue to the next task.

gzcat PATCHFILE.gz
cat is a program that reads a file and displays it to stdout (standard out, usually the screen). gzcat reads compressed files and displays them. If there is no gz cat you can try something like
cat `gunzip PATCHFILE.gz`
Everything between the `` runs first, and the output of that command is applied to the rest of it.

|
This is one of the most important characters in a Unix terminal. Its a PIPE. The output of the stuff ont he left side of the PIPE is used in the commands on the right side.

patch -p1[/quote]
This applied to patch (usually a diff file) to the proper files in your kernel source tree.

If RedHat does not support this card (ie there is no driver in the linux kernel) this linux thing is waaaay behind.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
29160N is based on the aic7xxx chipset and has been support for quite some time now, I can personally vouch for it as mine has been working for god knows how long without any patches from Adaptec.
 

Migroo

Diamond Member
Jul 14, 2001
4,488
9
81
Thanks for the very helpful responses :)

I have tried a few things with varying results.

Having run:
gunzip linux-aic7xxx-6.2.4-2.4.7.patch.gz

It removed the '.gz' from the filename. I'm left with a file linux-aic7xxx-6.2.4-2.4.7.patch

I try running cat linux-aic7xxx-6.2.4-2.4.7.patch and I get a massive screen dump, but obviously its not in my kernel dir.

Running cd /boot && cat linux-aic7xxx-6.2.4-2.4.7.patch works again as a screen dump, but obviously I'm not including the | patch -p1.

When I try running cd /boot && cat linux-aic7xxx-6.2.4-2.4.7.patch | patch -p1 I get the following error:

bash: patch: command not found

Any ideas? I'm pretty stuck here and in deep water :)
 

Sunner

Elite Member
Oct 9, 1999
11,641
0
76
Have you looked at your dmesg for hints?

Just type dmesg | more and you'll get a bunch of bootup stuff, such as the kernel detecting harddrives, cdrom's, etc, including SCSI controller.
Look in the output for any signs of your SCSI controller.

Or you could grep for it, that would be dmesg | grep aic, though Im guessing on the aic part since I don't have any computer with that specific card myself.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: Migroo
Thanks for the very helpful responses :)

I have tried a few things with varying results.

Having run:
gunzip linux-aic7xxx-6.2.4-2.4.7.patch.gz

It removed the '.gz' from the filename. I'm left with a file linux-aic7xxx-6.2.4-2.4.7.patch

I try running cat linux-aic7xxx-6.2.4-2.4.7.patch and I get a massive screen dump, but obviously its not in my kernel dir.

Running cd /boot && cat linux-aic7xxx-6.2.4-2.4.7.patch works again as a screen dump, but obviously I'm not including the | patch -p1.

When I try running cd /boot && cat linux-aic7xxx-6.2.4-2.4.7.patch | patch -p1 I get the following error:

bash: patch: command not found

Any ideas? I'm pretty stuck here and in deep water :)

Your kernel source probably shouldnt be in /boot and if you dont have patch you did not get all of the dev packages (Im guessing on which packages it is in...). Use the default kernel driver and forget this stuff.
 

Migroo

Diamond Member
Jul 14, 2001
4,488
9
81
Thanks for your input n0cmonkey and Sunner

n0c, how do I use the default kernel driver - hell, how do I setup a peice of hardware?

Whats the first thing you would do when installing a SCSI card and tape drive? (they are 'installed' in the PC physically, nothing more)

Thanks

EDIT - Actually I think the mistake I made was to assume that /boot/kernel.h was my source code... I'll have a look around for some more likely candidates and try the above procedures. I think patch didnt work because of the mistake I made...

I feel like such a n00b!

Cheers
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: Migroo
Thanks for your input n0cmonkey and Sunner

n0c, how do I use the default kernel driver - hell, how do I setup a peice of hardware?

Whats the first thing you would do when installing a SCSI card and tape drive? (they are 'installed' in the PC physically, nothing more)

Thanks

EDIT - Actually I think the mistake I made was to assume that /boot/kernel.h was my source code... I'll have a look around for some more likely candidates and try the above procedures. I think patch didnt work because of the mistake I made...

I feel like such a n00b!

Cheers

To get the SCSI card to work you would have to load the proper module in the kernel. I dont know what the module is for this card though, so you would have to google for the answer.

You can always check to make sure it isnt already setup like was mentioned earlier by looking through your dmesg.
 

Migroo

Diamond Member
Jul 14, 2001
4,488
9
81
OK n0c:

Originally posted by: Sunner
Have you looked at your dmesg for hints?

Just type dmesg | more and you'll get a bunch of bootup stuff, such as the kernel detecting harddrives, cdrom's, etc, including SCSI controller.
Look in the output for any signs of your SCSI controller.

Or you could grep for it, that would be dmesg | grep aic, though Im guessing on the aic part since I don't have any computer with that specific card myself.

I've just had a look at my dmesg: The only mention of SCSI is noted below, and is repeated twice in the dmesg:


SCSI subsytem driver Revision: 1.00
PCI: Found IRQ 10 for device 00:0f.0
(scsi0) <Adaptec AIC-7892 Ultra 160/m SCSI host adapter> found at PCI 0/15/0
(scsi0) Wide Channel, SCSI ID=7, 32,255 SCBs
(scsi0) Downloading sequencer code... 396 instructions downloaded
scsi0 : Adaptec AHA274x/284x/294x (EISA/VLB/PCI-Fast SCSI) 5.2.4/5.2.0
<Adaptec AIC-7892 Ultra 160/m SCSI host adapter>
Vendor: HP Model: C5683A Rev: C908
Type: Sequential-Access ANSI SCSI revision: 02
scsi: 0 hosts left


As I say, that message is repeated twice. Its obvious that the controller is found, but I'm not really sure how to interpret this.

Many thanks for your help, perseverance and patience!

Cheers
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: Migroo
OK n0c:

Originally posted by: Sunner
Have you looked at your dmesg for hints?

Just type dmesg | more and you'll get a bunch of bootup stuff, such as the kernel detecting harddrives, cdrom's, etc, including SCSI controller.
Look in the output for any signs of your SCSI controller.

Or you could grep for it, that would be dmesg | grep aic, though Im guessing on the aic part since I don't have any computer with that specific card myself.

I've just had a look at my dmesg: The only mention of SCSI is noted below, and is repeated twice in the dmesg:


SCSI subsytem driver Revision: 1.00
PCI: Found IRQ 10 for device 00:0f.0
(scsi0) <Adaptec AIC-7892 Ultra 160/m SCSI host adapter> found at PCI 0/15/0
(scsi0) Wide Channel, SCSI ID=7, 32,255 SCBs
(scsi0) Downloading sequencer code... 396 instructions downloaded
scsi0 : Adaptec AHA274x/284x/294x (EISA/VLB/PCI-Fast SCSI) 5.2.4/5.2.0
<Adaptec AIC-7892 Ultra 160/m SCSI host adapter>
Vendor: HP Model: C5683A Rev: C908
Type: Sequential-Access ANSI SCSI revision: 02
scsi: 0 hosts left


As I say, that message is repeated twice. Its obvious that the controller is found, but I'm not really sure how to interpret this.

Many thanks for your help, perseverance and patience!

Cheers

Someone with more Linux scsi experience can tell you more, but the card is found and the driver is probably loaded.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
That message means the controller and tape are found and working fine. You should be able to access the tape via /dev/st0.

Actually the 'scsi: 0 hosts left' looks like the driver was removed at a later time. Try 'modprobe aic7xxx' which will load that driver and you should be able to access the tape after that.