extract rar file freely?

24 replies [Last post]
chaosmonk

I am a member!

I am a translator!

Offline
Joined: 07/07/2017

In this thread[1] someone suggested Middleton's BIOS, which appears to
be a modified version of the Lenovo BIOS for the X61 that removes the
hardware whitelist. It doesn't seem to be free, but neither is the BIOS
it replaces, and if it makes it possible to install a freedom-respecting
WiFi card then I consider it better freedom-wise than keeping the
factory BIOS.

The problem is that the necessary files are distributed as a rar
archive, and I'm not sure how to extract it using free software.

I installed unrar-free,

$ sudo apt install unrar-free

downloaded the archive,

and attempted to extract it.

$ unrar x Dual-IDA_SATA-II_Whitelist_SLIC21_ThinkPad_X61_X61s_BIOS_(2.22-1.03).rar

Some of the files did extract correctly, but most of them said FAILED. I
then tried unar,

$ unar Dual-IDA_SATA-II_Whitelist_SLIC21_ThinkPad_X61_X61s_BIOS_\(2.22-1.03\).rar

and it seemed that not as many failed, and I got a more descriptive
error message for the ones that did fail.

BIOS update + CTRL-FN swap/32-bit/$01B2000.FL1 (2316822 B)... Failed! (Attempted to read more data than was available)
BIOS update/32-bit/$01B2000.FL1 (2316822 B)... Failed! (Attempted to read more data than was available)
BIOS update + CTRL-FN swap/32-bit/$01B2000.FL2 (2103350 B)... Failed! (Attempted to read more data than was available)
BIOS update/32-bit/$01B2000.FL2 (2103350 B)... Failed! (Attempted to read more data than was available)
BIOS update + CTRL-FN swap/32-bit/06f1.HSH (163 B)... Failed! (Wrong checksum)
BIOS update/32-bit/06f1.HSH (163 B)... Failed! (Wrong checksum)
BIOS update + CTRL-FN swap/32-bit/06f4.HSH (163 B)... Failed! (Wrong checksum)
BIOS update/32-bit/06f4.HSH (163 B)... Failed! (Wrong checksum)
BIOS update + CTRL-FN swap/32-bit/06f5.HSH (163 B)... Failed! (Wrong checksum)
BIOS update/32-bit/06f5.HSH (163 B)... Failed! (Wrong checksum)
BIOS update + CTRL-FN swap/32-bit/06f9.HSH (163 B)... Failed! (Wrong checksum)
BIOS update/32-bit/06f9.HSH (163 B)... Failed! (Wrong checksum)
BIOS update + CTRL-FN swap/32-bit/06fa.HSH (163 B)... Failed! (Wrong checksum)
BIOS update/32-bit/06fa.HSH (163 B)... Failed! (Wrong checksum)
BIOS update + CTRL-FN swap/32-bit/06fb.HSH (163 B)... Failed! (Wrong checksum)
BIOS update/32-bit/06fb.HSH (163 B)... Failed! (Wrong checksum)
BIOS update + CTRL-FN swap/32-bit/06fd.HSH (163 B)... Failed! (Wrong checksum)
BIOS update/32-bit/06fd.HSH (163 B)... Failed! (Wrong checksum)
BIOS update + CTRL-FN swap/32-bit/10661.HSH (163 B)... Failed! (Wrong checksum)
BIOS update/32-bit/10661.HSH (163 B)... Failed! (Wrong checksum)
BIOS update + CTRL-FN swap/32-bit/10671.HSH (163 B)... Failed! (Wrong checksum)
BIOS update/32-bit/10671.HSH (163 B)... Failed! (Wrong checksum)
BIOS update + CTRL-FN swap/32-bit/10674.HSH (163 B)... Failed! (Wrong checksum)
BIOS update/32-bit/10674.HSH (163 B)... Failed! (Wrong checksum)
BIOS update + CTRL-FN swap/32-bit/10676.HSH (163 B)... Failed! (Wrong checksum)
BIOS update/32-bit/10676.HSH (163 B)... Failed! (Wrong checksum)
BIOS update + CTRL-FN swap/#1.iso (6387712 B)... Segmentation fault

Searching for these two errors ("Attempted to read more data than was
available" and "Wrong checksum") and "unar" I was able to find a few bug
reports, but none with solutions.

Until now I have been fortunate enough to never have had to deal with a
rar file, but from what I can gather it is not a free format, and free
tools for extracting them like unrar-free and unar can only open some
rar files. Does this look like a file that can't be extracted freely, or
is there another issue here? Is it worth trying a newer version of unar?
Trisquel 8 has 1.9 and it looks like 1.10 is available in Debian
testing.

aloniv

I am a translator!

Offline
Joined: 01/11/2011

Same as these bug reports:
issues.hyperbola.info/index.php?do=details&task_id=1140
bugs.debian.org/cgi-bin/bugreport.cgi?bug=859346

You can get the Middleton img file for X61 from here (just follow the instructions provided in the link - replace sdX with the path to your USB thumb drive):
benou.fr/~ben/updating-thinkpad-x61-bios.html
benou.fr/~ben/bin/bios.img.xz

nadebula.1984
Offline
Joined: 05/01/2018

Don't trust 3rd-party BIOS modifications. I don't see it necessary to remove the white-list of X61/T61/R61. There are two powerful Atheros cards authorized by Lenovo's original BIOS, namely AR5424 and AR5418. Be sure to purchase one with FRU ID (i.e. original Lenovo part) and you won't be blocked by the white-list.

To unpack proprietary RAR packages, I don't find anything better (freer) than "unar". Just download the latest version from Debian's testing/unstable repository, as long as your system meets the dependencies.

aloniv

I am a translator!

Offline
Joined: 01/11/2011

AR5424 doesn't support N speeds so I wouldn't bother with it.

nadebula.1984
Offline
Joined: 05/01/2018

AR5418 11abgn 300 Mb/s is good enough, so I kept the original firmware.

Any "rogue" firmware modified by 3rd party can never be trusted.

aloniv

I am a translator!

Offline
Joined: 01/11/2011

Any "rogue" firmware modified by 3rd party can never be trusted.

Sounds like FUD to me. The original firmware can be trusted even less as it includes the wireless firmware whitelist antifeature. If I understand correctly the 3rd party BIOS images are made by disassembling the stock BIOSes so their security should be comparable. Unless of course you can prove that the developers of these BIOSes inserted rogue code your claim seems devoid of merit.

SuperTramp83

I am a translator!

Offline
Joined: 10/31/2014

>Unless of course you can prove that the developers of these BIOSes inserted rogue code your claim seems devoid of merit.

The problem is we do not know anything about the proprietary firmware. It could have been as well programmed to perform malicious tasks. Or, which is give or less the same, it could have been written terribly, full of (sec) bugs, and therefore exploitable. Trouble is also most firmware gets very rarely, if ever, updated.
So you are stuck with buggy, insecure firmware that you (or anyone in your place) can not fix.

aloniv

I am a translator!

Offline
Joined: 01/11/2011

The problem is we do not know anything about the proprietary firmware. It could have been as well programmed to perform malicious tasks. Or, which is give or less the same, it could have been written terribly, full of (sec) bugs, and therefore exploitable. Trouble is also most firmware gets very rarely, if ever, updated.
So you are stuck with buggy, insecure firmware that you (or anyone in your place) can not fix.

Stock BIOS updates are usually only provided in the first few months of a laptop's release in order to resolve issues such as difficulties installing operating systems that are not shipped with the laptop. Once the main issues are addressed by the laptop manufacturer no BIOS updates are to be expected and users rarely if ever perform BIOS updates. As long as the BIOS update is based on the last BIOS revision for your laptop it should be as secure as the stock BIOS.

jxself
Offline
Joined: 09/13/2010

The package you want is called unar. Notice the missing "r". It's for The Unarchiver, which supports newer rar versions than unrar-free does: https://www.fsf.org/blogs/licensing/free-rarv3-extraction

nadebula.1984
Offline
Joined: 05/01/2018

Update: unar 1.10 is available in Debian stable (stretch). But Trisquel 8 is based on the previous version of Ubuntu, so its packages are even more outdated.

https://packages.debian.org/stretch/unar

aloniv

I am a translator!

Offline
Joined: 01/11/2011

I tried extracting the archive mentioned with unar version 1.10.1 on Hyperbola and I encountered the same errors. The cause of the issue is that some RAR files cannot be extracted using unar although most files should work fine as unar does support newer versions of the RAR format.

chaosmonk

I am a member!

I am a translator!

Offline
Joined: 07/07/2017

Thanks everyone. I'll look into the AR5418 for now.

nadebula.1984
Offline
Joined: 05/01/2018

The FRU ID for AR5418 (Z61, X6x, R6x, T6x series) should be 42T0825. Just search this FRU number. All my said ThinkPad models (with original firmware) use said WLAN card.

Hint: The screws securing X61 series' WLAN cards and WWAN/Turbo memory cards are very hard to twist. A good screwdriver is needed.

aloniv

I am a translator!

Offline
Joined: 01/11/2011

Did you try the method which was posted here?
benou.fr/~ben/updating-thinkpad-x61-bios.html

chaosmonk

I am a member!

I am a translator!

Offline
Joined: 07/07/2017

> benou.fr/~ben/updating-thinkpad-x61-bios.html

Middleton's BIOS isn't more free than the factory BIOS, and it might be
worse security-wise, so I only want to resort to that if it is the only
way to install a freedom-respecting WiFi card. I have ordered an AR5418,
and if nadebula is correct that it is whitelisted I will stick with the
factory BIOS. If I can't get that card to work then I will try to
install Middleton's using your link. Thanks for finding and sharing
that.

nadebula.1984
Offline
Joined: 05/01/2018

A wise decision. As long as the WLAN adapter bears the correct FRU number, it should be authorized by the original firmware.

This card (42T0825) should work on any 945/965 chipset based ThinkPads (R6x, T6x, X6x and Z61 series). There are several variants designed for different regions around the world (according to local laws or regulations), though. For example, certain variants may have certain mode(s) disabled. Check the "part list" section of the hardware maintenance manual (HMM) for details.

chaosmonk

I am a member!

I am a translator!

Offline
Joined: 07/07/2017

> This card (42T0825) should work on any 945/965 chipset based ThinkPads
> (R6x, T6x, X6x and Z61 series).

I'm interested to know where you got this information, as this sort of
thing is very valuable to know. Each laptop listed in h-node has a
"wifi model" field saying whether or not the WiFi card works with free
software. It also has a "does the device prevent installing wifi cards
not-approved by the vendor?" field, to which the answer is usually "not
specified," but there is no field for "do any WiFi cards approved by the
vendor work with free software." I would love to have this knowledge for
Macbook models and more recent Thinkpad models.

nadebula.1984
Offline
Joined: 05/01/2018

I have 15 years of ThinkPad hardware maintenance/repair experience (since in 2004 when I received my Bachelor degree).

Such part/accessory information can be found in the hardware maintenance manual (HMM) for older ThinkPad models, but not newer ones. For more recent models (starting Nehalem or SandyBridge), the HMMs no longer contain a rather verbose "Part List" section.

In some cases, you can't replace the WLAN card because of the whitelist restrictions, and you can't replace the firmware because of Boot Guard. Examples include models based on Haswell/Broadwell ULV processors. Rumor says that starting Skylake, ThinkPads no longer have whitelist restrictions. But I'm not interested in anything newer than Haswell (normal voltage).

chaosmonk

I am a member!

I am a translator!

Offline
Joined: 07/07/2017

> Such part/accessory information can be found in the hardware maintenance
> manual (HMM) for older ThinkPad models, but not newer ones. For more
> recent models (starting Nehalem or SandyBridge), the HMMs no longer
> contain a rather verbose "Part List" section.

Okay, so my friend has an X201, so I'm looking at this,

http://tim.id.au/laptops/lenovo/thinkpad%20x200%20x200s%20x200si%20x201%20x201i%20x201s.pdf

and I see a "Parts List" section. On page 168 (176 in the pdf) it looks
like the WiFi card is labeled "7", so I should look up by FRU all of the
WiFi cards listed on pages 190-192 (198-200 in the pdf) and check
h-node to see if any of them work with free software?

nadebula.1984
Offline
Joined: 05/01/2018

In the X200/X201 HMM part list section, there is only one WLAN card from Atheros, namely FRU number 43Y6511. It's a very-low-end AR2425 half-height card. Unfortunately, this card is only usable on X200/s series. You can see the supported machine model list in the main column of the table. All machine models 74xx and 20xx belong to X200/s series. To my best knowledge, there is no Atheros card for Nehalem-based ThinkPads (X201/s, T410/s, W510). However, if you can buy some 43Y6511 cards, they are still useful. You can use them on X200, T/R400, T/W500 series without removing the white-list restrictions. They may be useful for those who need free/libre WLAN card but have difficulties modifying their firmware.

aloniv

I am a translator!

Offline
Joined: 01/11/2011

Middleton's BIOS isn't more free than the factory BIOS, and it might be worse security-wise

What makes you think it is less secure than the original BIOS? It sounds like FUD to me, unless you can prove the developers added malicious code (and we already know that the original BIOS contains malicious code that was removed in Middleton, namely the wireless whitelist antifeature).

J.B. Nicholson-Owens
Offline
Joined: 06/09/2014

name at domain wrote:
> What makes you think it is less secure than the original BIOS? It sounds
> like FUD to me.

The same reasoning that one reaches with any proprietary software -- if
you're not free to run, inspect, share, and modify the software running on
your computer it's not trustworthy. If Middleton's BIOS is distributed as
free software then the BIOS software can become trusted and the software is
a genuine contribution to us in the free world. Otherwise the BIOS is not
free software and not trustworthy.

chaosmonk

I am a member!

I am a translator!

Offline
Joined: 07/07/2017

> if
> you're not free to run, inspect, share, and modify the software running
> on your computer it's not trustworthy.

I think we can all agree on that. The question is whether a proprietary
BIOS modified by a third party is better or worse than the original
proprietary BIOS. On the one hand, there seems to be greater risk with
the modified BIOS, because you're vulnerable to abuse from both Lenovo
and the third party. On the other hand, if the modified BIOS disables
the whitelist then it has a practical advantage over the factory BIOS.
For the X61 it turned out to be a non-issue for me because there
apparently is a whitelisted Atheros card that works with free software,
but apparently this is not the case with the X201.

J.B. Nicholson-Owens
Offline
Joined: 06/09/2014

name at domain wrote:
> The question is whether a proprietary BIOS modified by a third party is
> better or worse than the original proprietary BIOS.
Better and worse here is a false dichotomy. Since both are proprietary this
is an attempt to compare two unknowns.

SuperTramp83

I am a translator!

Offline
Joined: 10/31/2014

A decent GUI unarchiver is peazip -> http://www.peazip.org/

cheers o/