Raspian Jessie and Stretch

To that end, I've downloaded the latest raspbian-stretch.zip and would like to write a microSD to try out the new system. Is there a way to uncompress the archive and pipe it to dd or an equivalent program to write the image to a spare card? The default Xarchiver on Raspbian seems inclined to extract the contents piecemeal, rather than as a disk image.

What I expected to use was something like sudo unzip -p *.zip | dd of=/dev/sdc but that gives a permissions error, then reports an archive error after the password is entered. The archive is a little over half a gig, which seems reasonable for a sparse image. The machine has only 3.5GB of free space, so I'd rather not write the image to the host's storage if I can help it.

I'd like to complete the operation using Raspbian only. What's the trick I'm missing?

Thanks for reading,

bob prohaska

Reply to
bob prohaska
Loading thread data ...

Well, the sudo there only applies to the unzip, not to the dd.

I'd be more inclined to go to a proper root prompt (su -, or sudo su - if you have to) and then try the rest of the incantation without the sudo. No need for password entry.

Also probably bs=1M on the dd for faster writes.

That's not any image I've downloaded recently:

-rw-r--r-- 1 roger roger 1776280071 Mar 14 05:17 2018-03-13-raspbian-stretch.zip

-rw-r--r-- 1 roger roger 365765304 Mar 14 05:21 2018-03-13-raspbian-stretch-lite.zip

Roger

Reply to
Roger Bell_West

Thanks, those are both good suggestions.

Hmm, looks like I'm not getting the entire archive using Chromium. Does raspberrypi.org have an anonymous ftp site somewhere? I tried ftp.raspberrypi.org, but couldn't guess the right username to employ. The traditional "ftp" username was rejected.

Thanks for reading!

bob prohaska

Reply to
bob prohaska

Yeah and you can't pipe to sudo.

It could work but if it fails you have no idea where it went wrong, unpacking or writing. I would unzip to another disk if you don't have enough space on your system disk, e.g. a usb stick, verify the .img file there (see size below), then write to the SDcard using 'sudo dd bs=1m if=stretch.img of=/dev/whatever'. You probably need to unmount (but not eject) the SDcard before you can use dd on it safely? That's the way it works on Mac, anyway. The device to write to is then /dev/rdisk1 (or 2,

3, etc) but I don't know how that works on Linux. On Mac I use this script I wrote:
formatting link

Yes and the unzipped "2018-03-13-raspbian-stretch.img" is 4.6 GB or 4.9 GiB (4949278720 bytes).

Reply to
A. Dumas

Yes you can...

or: sudo -s

I don?t see why, provided you?re prepared to read the error message.

--
https://www.greenend.org.uk/rjk/
Reply to
Richard Kettlewell

sudo -i

---druck

Reply to
druck

I'm stupid and was only thinking of output redirection to a file (which you can make work by '|sudo tee' so that's a counter example already...)

In my defence, I did use a .invalid address ;)

Reply to
A. Dumas

Redirection of sudo?s output to a file works fine too. Possibly the thing that is confusing you is that output redirection is done by the calling process, which when invoking sudo usually means it is done as a mortal user.

--
https://www.greenend.org.uk/rjk/
Reply to
Richard Kettlewell

No I am no longer confused, that is exactly what I meant & what I said: "sudo echo sometext >> /etc/notmyfile" won't work but "echo sometext | sudo tee -a /etc/notmyfile" will, for the reason you spelled out.

Reply to
A. Dumas

It?s a weird definition of ?doesn?t work?. Everything works as designed; it?s just not the way to achieve the goal you had in mind.

--
https://www.greenend.org.uk/rjk/
Reply to
Richard Kettlewell

Oh f*ck off.

Reply to
A. Dumas

?. Everything works as designed;

Right, less of that.

Reply to
druck

This is why you should verify the provided checksum matches. Both the stretch desktop & lite versions provide SHA-256 sums. Fire up ye olde shell, and

sha256sum whatever.zip

*a ridiculously long hex value*

such as (stretch desktop): d6d64a8bfad37de6bc7d975a335c69b8c6164a33b1ef0c79c888a9b83db5063f

Not seeing mirrors for the image zip file, tho.

formatting link
has links, signatures, SHA-256 sum files and such. You may be well served with a torrent download.

I'm on a fast network, and chrome told me it would take around 2 hours to download successfully. That maybe why you're having problems. The network download could be timing out.

Ah...when I fire up a terminal and fetch the image with wget, the speed improves greatly: under 3 minutes, estimated.

wget

formatting link

Alternatively, you can also use curl. Yep, wget worked almost perfectly and in a timely fashion. Well, the SHA-256 sum matched. The only draw back is that it downloaded a file raspbian_latest. It is a .zip file, but the extension was not part of the name. Not sure what caused that, could be operator error.

--
Consulting Minister for Consultants, DNRC 
I can please only one person per day. Today is not your day. Tomorrow 
isn't looking good, either. 
I am BOFH. Resistance is futile. Your network will be assimilated.
Reply to
I R A Darth Aggie
[...]

Like many people, I prefer downloading using the bittorrent protocol for downloading images. It is self-correcting: every block has a checksum, and when the checksum is not correct, the block is automatically re-transmitted.

Raspbian supports e.g. transmission (-daemon, -client, -gui) for bittorrent transfers.

--
my 2 cents 
Kees Nuyt
Reply to
Kees Nuyt

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.