element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum What are the basics?
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 16 replies
  • Answers 8 answers
  • Subscribers 664 subscribers
  • Views 2155 views
  • Users 0 members are here
  • rasberry_pi_3_b_plus
Related

What are the basics?

oghma
oghma over 7 years ago

I feel like I've started reading a mystery novel from about half way through, and its should come as no surprise that I'm having trouble getting anything done.

 

I'm not a complete novice when it comes to computers. I've built my own PCs, file servers (PC-DOS, MS-DOS, Windows, NT, Novel) I even used a PR1ME at Uni to run FORTRAN programs. But this Pi has me thinking I know nothing. It's taken me over a week to do the following:

- Stop my mouse from crawling across the screen

- Get rid of the big black border around the edge of my monitor

- Install an mSATA rive in the Pi Desktop and partition it into three using gparted. (Still not sure I've done this right)

- Ran update and upgrade on the OS

- Stopped menu choices in Chrome from showing white on white when I hover over them

- Installed Gimp 2.8

 

However, all of the above was achieved by following a recipe like advice from a guru. I feel I've learned very little on my journey.

 

What I've failed to do is:

- Install Firefox (erm - Iceweasel) and set this as my default browser

- Clone my mSD card onto my mSATA partition 1 so I can boot from it. (Why? : More room. mSATAs are more reliable, and yes - slower, USB2.0!. I can keep the mSD safe, should I need a recovery point.)

- Refer to my mSATA partitions with something a little more easy to remember than an 8-digit hex code.

 

I am working towards making this Pi into a simple file server with spool services over an IP intranet. I feel like I'm still so far away from my goal.

 

Sorry for the rant. I think what I'm after is something that I can build on, not just another recipe. Thanks for reading this far.

  • Sign in to reply
  • Cancel
  • colporteur
    0 colporteur over 7 years ago

    I can appreciate your frustration. I just retired after 37 years in technology from two disciplines electronics and computers. I have been working with Pi's and Ardunios for the past five years and still feel I am on the front side of the learning curve. Unable to coast going uphill.

     

    That being said, stay the course. You have accumulated knowledge and experience that can benefit this industry. What I have found most useful is a good understanding of installation and configuration of the Pi's operating system (O/S) provides the greatest benefit. I still stumble across what I call best practices that I wish I had of learned early. It can be as simple as sudo apt-get update being the go to command before mucking with the O/S.

     

    Beware of context when you read solutions. Most individuals that provide responses fail to set context. Comments like, it simple, that is easy to do or doesn't take long give hope. You soon discover it easy only if you have the knowledge to have their level of understanding. I never use these words when I write technical articles.

     

    Check dates on responses. Pi's change on what appears to be a daily basis especially the O/S. What worked yesterday might not work today. Recall the context. What O/S was used for the solution? Rarely mentioned in the responses. The problem may not exist today because the technology has been replaced. Ouch that hurts!

     

    I write tutorials for a UK computer magazine. Some articles involve Pi's. I provide a Bill of Materials first to establish a baseline. At least then we are all on the same page. I have read article in some magazines and posts online but can never get the project to work. I then discover I am not completely aligned with what the writers used in his project.

     

    I can see you are looking for some solutions in areas I have not delved in. I can't offer a solution. How about that should be easy. Feel any better? Persevere grasshopper (hopefully your age allows you to understand the pronoun) I have found it is challenging field that allows me to continue to learn. Just takes a lot more time than I thought it should.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • shabaz
    0 shabaz over 7 years ago

    Hi Steven,

     

    The things you're doing are fairly advanced, many users probably won't do mSATA partitioning, booting from mSATA, set up a file server, etc. All of these things are kind of 'Linux admin' related. If you've not used Linux before, then it takes time, i.e. there is a learning curve. Personally I'd recommend also installing Linux on your PC too (in a virtual machine) so you can experiment and get used to Linux. Most servers out there nowadays are Linux based I think, so there will be lots of resources for Linux as well as specific ones for Pi. I was lucky I did an admin course (not on Linux, but another UNIX). But that is the area to search for, if you're interested in such stuff (e.g. search for books on Linux admin).

     

    Since most stuff is open source, there could be builds/executables ready-made for the Pi, or you may occasionally have to compile/build from the source code. I'd say the need for the latter is becoming more infrequent nowadays, since the Pi has been quite popular, and a lot of stuff has been compiled/built for it now. In the past it was not that common and you'd have to build apps the source. As a vague guess, perhaps 70% of the Linux stuff you may want could be already available compiled for the Pi.

     

    If you want to use the Pi as a file server, check out Samba, that may help. Or there may be more complete packages/scripts you can download and install.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • colporteur
    0 colporteur over 7 years ago

    I am sorry folks, it appears my fat fingers resting over the touchpad below the keyboard made some edits I would have preferred to not have. Nothing was omitted in the post just repeat. My apologies again.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • oghma
    0 oghma over 7 years ago

    Sean Conway - Thank you for the encouragement. I've spent money so I'll persevere!! I *do* believe in the potential. I think I can put a server together for about 10% of the price of an MS version, so - no contest. The only thing missing is *my knowledge*.

     

    (Yes, I did get the 1970s reference. Kung Fu - be the best you can be.)

     

    shabaz - Thank you for the pointers to Linux Admin and Shamba. This will save me some time, I'm sure. This is what I needed - a direction.

     

    Sometimes the wealth of information on the net is just an embarrassment of riches! I would love searches to be *AND* and NOT *OR*! If anyone would like to add or narrow the research further, please feel free to add your comment. Thank you.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • colporteur
    0 colporteur over 7 years ago in reply to oghma

    For a windows file server, Shabaz suggestion of using SAMBA application is ideal. There are resources available for setting it up. I am not a windows guy so I will leave out any reference to a resource. I have done a setup with no access restriction on the shares available but I think you need a little more than that.

     

    How comfortable are you with the O/S installation? I can provide you some guidance.

     

    This project can be accomplished with the reduced version of Raspbian O/S to maximize space and reduce download size of the O/S.

     

    A fileserver using samba can be operated headless (i.e. no keyboard, video or mouse attached). Access to the Pi for configuration would be done over a network connection using SSH.

     

    My thought is to provide you the knowledge to build a stable O/S platform to begin your build. This also includes giving some thought to security.

     

    What is your level of O/S knowledge?

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • oghma
    0 oghma over 7 years ago in reply to colporteur

    Its been a while, Sean. I've built a Windows NT/Novel 4.11 server pair with authentication via the Novell Server, (Windows NT set to Trust). I must admit, this was a while ago. Never got around to updating the NT Server to 2003 Server. Semi-retired now, so not a lot of cash to spend on the new kit to run it, hence the move to the Pi.

     

    My thoughts were to learn to build a workstation first (thats why I installed Gimp 2.8 for example). Then I could migrate everything to the mSATA to begin turning it into a server. I would then have a mSD card ready to go for a workstation later, once I had a few more funds.

     

    The kit I currently have is:

    Pi-Desktop with Pi 3B+ and 16Gb mSD card pre-installed with Raspian. Oh, and a 2.5amp PSU.

    10" monitor with a USB keyboard/mouse combo

    Kingston 480Gb mSATA (3 partitions all FAT32: 58Gb, 200Gb, 200Gb) - the most expensive component!

     

    I wanted to have Firefox (Iceweasel) as I don't care for Chrome, before I did the migration.

     

    I appreciate any help you could point me to, in order to understand what I need to do from the ground - up.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • colporteur
    0 colporteur over 7 years ago in reply to oghma

    Have a read and send me any questions before you start if needed. These instructions will enable you to install an operating system O/S on a Pi, have it reboot supporting wireless to enable a console ssh connection to finish the install. This enables to establish an O/S with out ever having to use a keyboard, monitor or mouse connected to the Pi.

     

    If you are successful with this, I can send some security hardening instructions.

     

    For this project we’ll use the Raspbian Stretch Lite operating system. All the bells and whistles that are offered in the full install (i.e. no GUI) of Raspbian aren’t required for this build. The project doesn’t need a GUI, so why load the software? Bear in mind that using the Lite version of the OS increases the likelihood of some additional software installs.
     

    The command for transferring the OS images to an SD card is dd . The images referred to here aren’t the images for the movie screen, but rather the bit-by-bit copy of OS software that can be put on an SD card. It’s important to get the command syntax correct for the dd command to function correctly.

    An alternate solution is to use an open source tool that provides a GUI interface. The Etcher GUI application reduces the complexity of the image transfer process.
     

    The Etcher application eliminates the need to have all attributes in dd correctly aligned to enable a successful image transfer. For good measure Etcher is also able to verify the image after the transfer process.
     

    Grab the a version of Etcher from https://etcher.io. After installing the software on your loading host (such as the PC you’re using to transfer the image), use the Etcher GUI to transfer the uncompressed Lite version of Raspian Stretch (www.raspberrypi.org/downloads/raspbian) to the micro SD card.

    When the Etcher indicates the process is complete, unplug and plug back in the device holding the micro SD card. This triggers the operating system to automount the directories of the image on the SD card so they become available for the next steps.
     

    To avoid requiring a keyboard, video and mouse (KVM) and a wired network attached to the Raspberry

    Pi, the following changes will add a few files to the operating system to establish the Pi in headless

    operation (in other words, without a keyboard, video and mouse) for the remainder of the configuration

    process. The requirement for KVM and a network cable are eliminated by having the Pi establish a Wi-Fi connection and initiating the SSH daemon in the Raspbian operating system on boot up.
     

    Next, use a text editor to create a file with the

    following contents:

    network={

    ssid=”SSID”

    psk=”password”

    key_mgmt=WPA-PSK

    }
     

    Replace SSID with your Wi-Fi network identifier, and psk with your Wi-Fi password. Save the file using the name wpa_supplicant.conf in the bootfs directory of the Raspian operating system on the SD card. When the file wpa_supplicant.conf is discovered during the boot sequence, the OS makes the necessary modification to establish the wireless configuration as you’ve defined it.
     

    In the same bootfs directory create a blank file with the name ssh – note that no file extension is required. When the ssh file is discovered during the boot sequence, the OS make the necessary modification to enable the SSH daemon on boot up.
     

    Boot the Pi with the imaged SD card installed. Now, with the Wi-Fi network connection established on boot up, and the secure communication protocol SSH supported, a connection to the device can be made using the command ssh pi@<replace all with device IP> from the CLI using default Pi credentials.
     

    With a SSH connection established, let’s get the operating system up to date with an update and

    upgrade command:

    sudo apt-get update

    sudo apt-get upgrade
     

    To aid users in making some common configuration operating system changes, the development team for the Pi maintains a tool called raspi-config. It’s a menu- driven application that steps through different configuration options, relieving the user of the burden of knowing all the commands. Using the raspi-config tool sudo raspi-config , cull the menu lines to establish the

    following elements:

    Change default password

    Change hostname

    Change localisation options to reflect the location

    Expand the file system
     

    There’s no need to use the menu options for Wi-Fi and SSH because this was accomplished by placing

    unique files in the boot file system. The menu options can still be used to make changes to these options if required. Depending on the options changed the OS may require a reboot. Indeed, it’s best practice to perform a reboot after carrying out any configuration changes to check that they’re still in place whenever you restart your system.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • oghma
    0 oghma over 7 years ago in reply to colporteur

    Thank you, Sean. ...and so the reading starts!

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • oghma
    0 oghma over 7 years ago

    Currently having problems. Well no surprise there - but the severity will seem to be overwhelming. I'm stuck in Emergency mode, I'm offered the line, Press ENTER to continue. Doesn't work. Back to where I started! Don't even see a $ prompt.

     

    See above for H/W. What I did:

    1. Downloaded the LITE raspian from RaspberryPi.org, Copied the image file to a 16Gb SanDisk Ultra. Booted the Pi.

    2. Congigured LITE with a new hostname, checked all the country stuff for GB, etc. Worked fine.

    3. Installed Samba [$ sudo apt-get install samba samba-common-bin], updated the pswd [$ sudo smbpasswd -a pi] Worked fine.

    4. Mounted my mSATA partitions. [$ sudo mkdir /mnt/MYLABEL] and then [$ sudo mount /dev/sda9 /mnt/MYLABEL]  where 9=1, 2 or 3. Worked fine

    5. Time to make them permanent. Checked the partition information with [$ sudo blkid /dev/sda9] where 9=1, 2 or 3, as I have three partitions.

    6. Ran [$ sudo nano /etc/fstab] and made each line the same format:

       [PARTUUID=5daf9610-09 /mnt/MYLABEL vfat defaults,auto,umask=000,users,rw 0 0] There are three lines where 9=1, 2 or 3.

    7. I had been going all day, as I was reading and documenting as I went. It was dinner time, so I [Shutdown]. Worked fine - or so I thought...

     

    On checking the net for my problem I have tried the following:

    Removed the SD card from the Pi, so I can edit the file [cmdline.txt] and add to the line [init=/bin/sh]. It now reads:

       [dwc_otg.lpm_enable=0 console=tty1 root=PARTUUID=78400886-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

    init=/bin/sh] all on one line.

     

    I get the same problem. Both the ^D and ENTER keys send me in a loop to keep me in Emergency Mode. I don't have another Pi. I don't have a way of editing the fstab file. (Do I need to invest in a mSD card reader USB device?) I have a working O/S on another SD card, with the GUI that I was playing with originally.

     

    What I did notice while rebooting several times is that my partitions 1 and 2 are mounted [Okay], but there is no news that I can see about the third partition.

     

    Apart from starting from scratch, can anyone adise on a way out of this?

    Thank you for reading this far.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • shabaz
    0 shabaz over 7 years ago in reply to oghma

    Hi Steven,

     

    It's always frustrating having done a lot of work to get stuck like this : (

    Without another card reader, it will he hard to do anything, but even if you had the card reader, I do not know what could be done at this stage, since file system partitions are very low-level and so either things work, or don't work at all : ( I'm not too familiar with procedures at the file system level : (

    A couple of options you may prefer (if you plan to start again) is to (a) just have a single partition if possible - I'm not sure mSATA over USB will provide benefits from multiple partitions, and sometimes there is more inflexibility with partitions. It was always a pain running out of partition space in earlier times, and nowadays I'll just use a single one. I don't know if that is recommended practice for a server or not these days, but for a home system I think it should be fine.

    The second thing you might want to do is not mount on startup using fstab. If you do that, then if the mSATA cable is disconnected, the startup hangs for a long time since it is trying to mount something that is non-existent, until  some timeout. It could be easier to have a script to perform the mount afterwards (and the script could be automated). That way, if the cable is disconnected, then the Pi will still start up fully.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube