Author Topic: The big 'ole Raspberry Pi topic  (Read 21754 times)

0 Members and 1 Guest are viewing this topic.

Offline Dan Graves

  • All Time Legend
  • *******
  • Posts: 6654
  • Good Vibes 168
  • Is on the Outside, looking in
Re: The big 'ole Raspberry Pi topic
« Reply #30 on: February 09, 2014, 10:46:21 pm »
Code: [Select]
sudo apt-get update && sudo apt-get upgrade -y  that little snippet of code will be your best friend and worst enemy 8)
That and
Code: [Select]
sudo apt-get install (fill in package name here)
« Last Edit: February 09, 2014, 11:43:28 pm by Dan Graves »
"So the secret to good self-esteem is to lower your expectations to the point where they are already met?" -- Hobbes
"Right. We should take pride in our mediocrity!" -- Calvin

Offline TB-AV

  • Honorable Ex-Mod
  • All Time Legend
  • *****
  • Posts: 15010
  • Good Vibes 329
Re: The big 'ole Raspberry Pi topic
« Reply #31 on: February 09, 2014, 10:46:49 pm »
Equally, any part of the tree can be moved to a new physical drive and will (or can be made to) appear in the same place in the filing system as it originally did.

This takes a little getting used to, but it is ball-achingly elegant.


Now that I was not aware of.... and yes I do think think I'm starting to feel something ache.

What does sometimes confuse new users is that there is a, fairly standard file system structure with system directories cryptically called "/etc", "/usr", "/var" and so on. Most of these can be ignored most of the time. As a user your files and personal app configuration settings will be stored in your "/home/tbav" folder.

But what if your boot drive is say a small SSD and you have say massive gigs of samples... Normally I would want Prog on C and Library on D:\Samples for instance... How would you handle that?

I hope you had a backup because it's now gone!

That I can deal with... I usually have a backup before I hit delete.

If you are ultra paranoid, there are apps which will "shred" the file by overwriting the disk space with random patterns that so that even the NSA would find it difficult to recover the data.


No, I just like to know what is what... when drives get old I might do an NSA type wipe if I want to re-use it but normally I retire them ( with a screw driver and hammer )
Gone

Offline TB-AV

  • Honorable Ex-Mod
  • All Time Legend
  • *****
  • Posts: 15010
  • Good Vibes 329
Re: The big 'ole Raspberry Pi topic
« Reply #32 on: February 09, 2014, 10:49:03 pm »
Code: [Select]
sudo apt-get update && sudo apt-get upgrade -y  that little snippet of code will be your best friend and worst enemy 8)
That and
Code: [Select]
supo apt-get install (fill in package name here)

Is that book really ok... or are you just joking... Also what does that code mean?

Looks like first line is saying maybe go look for updates as admin and do the update?

2nd line ??? supo?? I don't know --- somebody go get something and install it.... which might overwrite something I as a lowly user might be sorry I did??



Gone

Offline Dan Graves

  • All Time Legend
  • *******
  • Posts: 6654
  • Good Vibes 168
  • Is on the Outside, looking in
Re: The big 'ole Raspberry Pi topic
« Reply #33 on: February 09, 2014, 10:57:42 pm »
But what if your boot drive is say a small SSD and you have say massive gigs of samples... Normally I would want Prog on C and Library on D:\Samples for instance... How would you handle that?

Same as in windows, really.
Or any OS for that matter.
Point OS to new/larger drive, tell it to install there or to move items there for storage.
Most of it can be done through GUI, and if not, the command line isn't anywhere near as daunting as it may seem at first.

That book is not a joke, it's an actual desk reference for linux.
I'd not go with the 2nd edition that i have, as it's dated, but as a basic manual it is fine.
[edit] http://www.dummies.com/store/Computers-Internet/Operating-Systems/Linux.html
Find recent editions for those online and see if they seem useful[/edit]

The first code snippet is self explanatory if you look at what Keith told you about the sudo command.
It's a Debian command (which works on just about every debian derivative) that tells the 'Advanced Packaging Tool' package manager (Apt) that you want user Root (sudo) to look for updates (apt-get update) and then upgrade without asking you questions like 'this new install will take an extra 200kb of disk space, do you want to allow this' (apt-get upgrade -y).
http://en.wikipedia.org/wiki/Advanced_Packaging_Tool

The second snippet is a command to install a package, like say, VLC player (and of course i made a xx--xx typo and somehow typed a P insstead of a D , turning sudo into supo :-[ ).
So a anyway, as per the example of installing VLC player
Code: [Select]
sudo apt-get install vlc
"So the secret to good self-esteem is to lower your expectations to the point where they are already met?" -- Hobbes
"Right. We should take pride in our mediocrity!" -- Calvin

Offline TB-AV

  • Honorable Ex-Mod
  • All Time Legend
  • *****
  • Posts: 15010
  • Good Vibes 329
Re: The big 'ole Raspberry Pi topic
« Reply #34 on: February 09, 2014, 11:21:25 pm »
Ah... ok... I didn't see p next to d so I figured it wasn't a typo.

So on the D: versus not having drive letters.... I will simply see 'something' like maybe a drive name?

I was sort of reading this as.....

Win
C: - 250G
D: - 1T

Linux
Drive Space - 1.250T

and trying to figure how does that work with \user\tbav\  as I assumed tbav\ must be somewhere and how will I know that \Library\Samples actually ends up on that D: drive
Gone

Offline Majik

  • Stadium Superstar
  • ******
  • Posts: 1819
  • Good Vibes 86
Re: The big 'ole Raspberry Pi topic
« Reply #35 on: February 09, 2014, 11:26:00 pm »

But what if your boot drive is say a small SSD and you have say massive gigs of samples... Normally I would want Prog on C and Library on D:\Samples for instance... How would you handle that?

The point is it's all one big file system.

A lot depends on whether you have separate fixed internal drives (or separate partitions of those drives) or removable media. At the file system level, the principle stands: it's all one big file system, but most Linux distros are set up to deal with them slightly differently.

For "permanent" drive mappings, these are usually configured in a config file. Normally this is created for you at installation time, but you can alter it using various GUI utilities (like partitioning tools) or by using a text editor on the file itself. Normally you wouldn't need to mess with it.

For instance, if you wanted to have another physically installed drive just for music files, you could connect it to the file system at "/home/tbav/data" or "/var/samples" or, in fact, almost anywhere you want.

More normally you could have the whole /home directory (with users files) on a separate drive. The point is, you could start with a single drive with /home sharing space with everything else. Then if you buy a new drive you can move /home to it, and it would still be /home. The file structure is independent of physical drives. If you have any apps that expect data to be at /home/tbav then they won't care that you've moved this data to another drive; it is totally transparent to them as long as the pathname doesn't change.

For removable media, the OS will usually automatically connect this to the file system tree at some commonly defined place, such as /media. So you might have "/media/cdrom" and "/media/floppy" or "/media/KeithsUSB1" for a usb drive. In a desktop environment this is all transparently done and there's usually some nice gui way of accessing things like USB keys.

This works for file shares as well. For instance, I have a file share on a different machine (actually a NAS) which is mounted at "/fileserver/share". on my desktop PC. That was my personal choice and it was totally arbitrary.

Cheers,

Keith
Guitars: PRS Singlecut S2, Fender Tele Lite Ash, G&L Legacy Tribute, Freshman Apollo 2 OCBX
Amps: Bugera G5 Head, Boss Katana 100
All sorts of other stuff.

Offline Majik

  • Stadium Superstar
  • ******
  • Posts: 1819
  • Good Vibes 86
Re: The big 'ole Raspberry Pi topic
« Reply #36 on: February 09, 2014, 11:39:52 pm »
Code: [Select]
sudo apt-get update && sudo apt-get upgrade -y  that little snippet of code will be your best friend and worst enemy 8)
Quote

This is, roughly, the command line equivalent to doing a Windows Update on a distro like Ubuntu or Mint.

Breaking it down

sudo : execute this with superuser privileges
apt-get update : this means update the local index of the software repositories. This index includes details of software versions and updates
&& : this, effectively, means "start a new command". It's a way to combine multiple commands on one line
sudo : execute this with superuser privileges
apt-get upgrade : install all updates


Quote
That and
Code: [Select]
supo apt-get install (fill in package name here)

That means "with super user permissions, install package called ....".

There are, by the way, normally GUI equivalents to these. But it's a lot quicker to tell someone "cut and paste this into a terminal" than to instruct them to use a gui to do these actions, so you often see these bandied around.

Cheers,

Keith
Guitars: PRS Singlecut S2, Fender Tele Lite Ash, G&L Legacy Tribute, Freshman Apollo 2 OCBX
Amps: Bugera G5 Head, Boss Katana 100
All sorts of other stuff.

Offline TB-AV

  • Honorable Ex-Mod
  • All Time Legend
  • *****
  • Posts: 15010
  • Good Vibes 329
Re: The big 'ole Raspberry Pi topic
« Reply #37 on: February 09, 2014, 11:41:48 pm »
Ok, I think I see what you are saying now...

So let's say in windows speak I had this

C:\ one part
D:\ divided into 4 parts -- for no special reason but let's say it ended up D E F G

Linux

After first install it might default to user/tbav on what I know to be the C:\

I could then simply move the entire user/any-and-all-users to D: .. not sure how I will know it's the D: or first partition but I assume it's not hard to see that.

So then I could load samples onto say G: and wha ti would see is

user/tbav/samples   someone else might see user/their name/samples

But if I wanted to do a safety backup I would be backing up the G: partition which again I assume is shown to me as such by some means ... like maybe it says Sample Partition or similar.

Gone

Offline Dan Graves

  • All Time Legend
  • *******
  • Posts: 6654
  • Good Vibes 168
  • Is on the Outside, looking in
Re: The big 'ole Raspberry Pi topic
« Reply #38 on: February 09, 2014, 11:46:43 pm »
"So the secret to good self-esteem is to lower your expectations to the point where they are already met?" -- Hobbes
"Right. We should take pride in our mediocrity!" -- Calvin

Offline TB-AV

  • Honorable Ex-Mod
  • All Time Legend
  • *****
  • Posts: 15010
  • Good Vibes 329
Re: The big 'ole Raspberry Pi topic
« Reply #39 on: February 09, 2014, 11:49:03 pm »
Quote
update the local index of the software repositories.

Ok so now in that example were are those repositories? Are they out on the Internet, on a DVD, a file I just downloaded or are they part of my Linux install that is simply sitting on the disk somewhere that I have never actually used.

I think that's another thing that always confused me about Linux and my 'secure' issue. I get confused about what exactly do I have and what do I need?

Like if I want to update Reaper for instance. Version 4.51 running now... they show ver. 4.52 on site. Pretty easy, I'm out of date so I download. I know I need to run it... so I do... do you want to update... yes... fine, it's done, do you want to run 4.52 now?

I can't seem to grasp that what, when, where of Linux.
Gone

Offline TB-AV

  • Honorable Ex-Mod
  • All Time Legend
  • *****
  • Posts: 15010
  • Good Vibes 329
Re: The big 'ole Raspberry Pi topic
« Reply #40 on: February 09, 2014, 11:58:50 pm »
This may shed some light on that : http://en.wikipedia.org/wiki/Device_file#Linux_naming_conventions

So if SATA drives it looks like G:partition would be ??? sdb??? I can't quite figure how that partition is identified.

SD=drive

SDB=second drive

But I can't figure how those partitions are handled
Gone

Offline TB-AV

  • Honorable Ex-Mod
  • All Time Legend
  • *****
  • Posts: 15010
  • Good Vibes 329
Re: The big 'ole Raspberry Pi topic
« Reply #41 on: February 10, 2014, 12:02:05 am »
BTW... I recall seeing some of this stuff now but every time I have messed with Linux I was trying to recover a failed windows drive so it was not exactly a good learning environment. It was more like panic. and usually I stumbled around simply by recognizing the files and knowing where they were in my windows environment.
Gone

Offline Dan Graves

  • All Time Legend
  • *******
  • Posts: 6654
  • Good Vibes 168
  • Is on the Outside, looking in
Re: The big 'ole Raspberry Pi topic
« Reply #42 on: February 10, 2014, 12:07:06 am »
Repositories are on the internet, specifically on trusted servers.
As for versions, that's where
Code: [Select]
sudo apt-get update && sudo apt-get upgrade -y comes in, as it figures out if there is a newer version than what you have, and it does the work for you, much like a built in updater for windows software does.
And most distributions will have GUI run package managers like Synaptic, Aptitude etc, that will tell you 'hey, there's updates for (list of software, drivers, firmwares and kernel updates here), do you wish to update, and if so, what shall we update ?'.
Ubuntu, as much as i loathe it, is a prime example of this : http://en.wikipedia.org/wiki/Software_Updater http://www.zdnet.com/blog/bott/windows-update-versus-ubuntu-update/496

As for drives, it would be
SDA = one drive
SDB = another drive
SDC = another drive
>SDC1 = that ^drive, partition one
>SDC2 = as above, but partition two.

It's always SD(letter) or HD(letter) for a drive, with appended numbers for partitions per drive.

Something to keep in mind, TB;  linux has become more like windows over time.
There's GUI's for everything.
"So the secret to good self-esteem is to lower your expectations to the point where they are already met?" -- Hobbes
"Right. We should take pride in our mediocrity!" -- Calvin

Offline Majik

  • Stadium Superstar
  • ******
  • Posts: 1819
  • Good Vibes 86
Re: The big 'ole Raspberry Pi topic
« Reply #43 on: February 10, 2014, 12:13:15 am »
As for "how do I know which drive is D", well that is done by some sort of raw drive identifier. There's two ways to do this which I will, call the "old way" and the "new way", although on many systems both systems are supported.

In the "old way", drives appear within the /dev pseudo filing system. The filing system is so important and powerful in Linux than most system resources are mapped into it in one way or another. You can literally open a file browser on the /dev folder and see the raw drives.

For most (non SCSI) drives they normally appear as /dev/sd<x> where x = a, b, c, d, etc.

Then each partition also show up separately as a file with the same name and a number.

So, if you had two physical drives with two partitions on the first drive and 3 on the second, they would appear as:

/dev/sda - The complete drive
/dev/sda1 - partition 1
/desv/sda2 - parition 2
/dev/sdb
/dev/sdb1
/dev/sdb2
/dev/sdb3

This system has many advantages, but if you move a drive to another controller then the drives will be renumbered and this will mess things up.

You can actually examine the raw data of any partition, or the whole drive, by reading the appropriate file. You can image any partition, or the whole drive, by copying the appropriate file.

The "new way" is based on the fact that, with modern drives and BIOS/UEFI, partitions have a unique UUID assigned to them when they are created. You can simply refer to the UUID and it doesn't matter which controller the drive is connected to.

But in either case, in order to map the partition to a specific place in the file tree, you "mount" it. This is either done with a manual command, or an automounter (in the case of things like USB drives) or by specifying the desired mapping in a file that is read at boot time.

Cheers,

Keith
Guitars: PRS Singlecut S2, Fender Tele Lite Ash, G&L Legacy Tribute, Freshman Apollo 2 OCBX
Amps: Bugera G5 Head, Boss Katana 100
All sorts of other stuff.

Offline bradt

  • Stadium Superstar
  • ******
  • Posts: 1871
  • Good Vibes 66
Re: The big 'ole Raspberry Pi topic
« Reply #44 on: February 10, 2014, 12:56:40 am »
All of this that you guys are posting is a very good argument for getting a Raspberry Pi, or Beaglebone Black. It's a great way to learn linux, and basic physical computing.

In the case of Pi, that's kind of what it was designed for; to be a cheap computer that you really can't brick if you screw up the software setup, and don't really break the bank if you drop it.

Beaglebone black is similar, but doesn't have near the video (or audio) support. However, if controlling physical systems is your thing, it has a much better GPIO setup (and many more of them).

 

Get The Forum As A Mobile App