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 2157 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
Parents
  • 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
  • oghma
    0 oghma over 7 years ago in reply to shabaz

    Thank you, shabaz. Script? Like autoexec.bat in DOS? Okay, I'm on board. So, where does the script live?

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

    Hi Steven,

     

    I've just checked my Pi 3B, and my fstab file is a little different to yours. Mine has this entry:

    UUID=E408-3CDE /mnt/ssd vfat users,noatime,umask=0 0 2

     

    So, you could try it in the format as I have, it works for me. The entire file looks like this:

    proc            /proc           proc    defaults          0       0
    /dev/mmcblk0p1  /boot           vfat    defaults          0       2
    /dev/mmcblk0p2  /               ext4    defaults,noatime  0       1
    UUID=E408-3CDE /mnt/ssd vfat users,noatime,umask=0 0 2
    # a swapfile is not a swap partition, no line here
    #   use  dphys-swapfile swap[on|off]  for that

     

    First, find out what the SSD device file is called.. it should be /dev/sda1

    You can see them by typing:

    ls -ald /dev/sda*

     

    You can confirm the UUID value by typing:

    ls -l /dev/disk/by-uuid | grep sda1

     

    test it first using the mount command, like so (as root user, or prepend sudo):

    mount /dev/sda1 /mnt/ssd

     

    Only if that works, should the fstab modification be attempted.

     

    Otherwise, if you wish to try not using fstab and instead mount afterwards, test it first using the mount command, as above.

     

    If that works for you, then you can automate it as follows (all of this needs to be done as root user, or prepend the commands with sudo):

     

    Create a file in the folder /lib/systemd/system called mountssd.service

    Put the following content inside it (notice that it has the mount command on line 11):

     

    # systemd service file to mount SSD
    
    
    [Unit]
    Description=Mount SSD
    After=multi-user.target
    
    
    [Service]
    Type=simple
    ExecStart=/bin/mount /dev/sda1 /mnt/ssd
    SyslogIdentifier=mountssd
    StandardOutput=syslog
    
    
    [Install]
    WantedBy=multi-user.target

     

    Change the file permissions by typing:

    chmod 644 /lib/systemd/system/mountssd.service

     

    Then, enable the service:

    systemctl daemon-reload
    systemctl enable mountssd.service

     

    Finally, reboot the machine by typing reboot , and the SSD should be mounted.

    I've tested on my Pi, and that script worked for me. It could be improved, but I'm not a systemd expert. However, that script worked in my basic test.

    • 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 shabaz

    Thank you, shabaz. This is very helpful. Some of the steps to test the mount I did to see that the drive was correctly connected. I will look into the scripts, as I think you have a point about the Pi booting up before anything is attempted.

     

    My problem stemmed from the fact that I only have one Pi. I've ordered a cheap USB mSD card reader. In the meantime I did the following:

    1. Downloaded linuxwin_trial.msi from https://www.paragon-software.com/home/linuxfs-windows/#

    This allowed me to see the ext4 partition of my mSD card. It meant that I had access to the fstab file from my Windows PC.

    2. Downloaded nano-git-0d9a7347243.exe from https://www.nano-editor.org/dist/win32-support/

    As Notepad likes a <CR><NewLine> combo, it's useless when editing Linux files. Nano does the job!

     

    I found that the line in fstab causing all the problems was:

    PARTUUID=5fad9610-03 /mnt/MYLABEL vfat defaults,auto,umask=000,users,rw 0 0

    as it should have read:

    PARTUUID=5daf9610-03 /mnt/MYLABEL vfat defaults,auto,umask=000,users,rw 0 0

     

    Dyslexia rules KO!

     

    That will teach me to do important stuff at the end of a long day.

     

    So, I'm back on track, and all I have to do is configure samba and get some user accounts up and running.

    I think I'll use the scripts for the rest of the configuration.

    Thanks again, shabaz

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

    Thank you, shabaz. This is very helpful. Some of the steps to test the mount I did to see that the drive was correctly connected. I will look into the scripts, as I think you have a point about the Pi booting up before anything is attempted.

     

    My problem stemmed from the fact that I only have one Pi. I've ordered a cheap USB mSD card reader. In the meantime I did the following:

    1. Downloaded linuxwin_trial.msi from https://www.paragon-software.com/home/linuxfs-windows/#

    This allowed me to see the ext4 partition of my mSD card. It meant that I had access to the fstab file from my Windows PC.

    2. Downloaded nano-git-0d9a7347243.exe from https://www.nano-editor.org/dist/win32-support/

    As Notepad likes a <CR><NewLine> combo, it's useless when editing Linux files. Nano does the job!

     

    I found that the line in fstab causing all the problems was:

    PARTUUID=5fad9610-03 /mnt/MYLABEL vfat defaults,auto,umask=000,users,rw 0 0

    as it should have read:

    PARTUUID=5daf9610-03 /mnt/MYLABEL vfat defaults,auto,umask=000,users,rw 0 0

     

    Dyslexia rules KO!

     

    That will teach me to do important stuff at the end of a long day.

     

    So, I'm back on track, and all I have to do is configure samba and get some user accounts up and running.

    I think I'll use the scripts for the rest of the configuration.

    Thanks again, shabaz

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

    I'm going to start a new post, as this one is getting a bit full. I'll call it A File Server That Won't Share Shares.

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

    It sounds like you have some the answers you were looking for. Any chance of posting a summary status and then you might consider indicating your issue has be resolved by closing the answer section.

     

    Sean

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

    Sean,

     

    I think I successfully closed this one down, but I think I still have issues. The summary you requested is in the new post:

    A File Server That Won't Share Shares

     

    Thanks for your help

    -Steven

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify 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