Lothar Posted December 31, 2015 Posted December 31, 2015 Hi, Beside some limitations with cubox's hardware I love my cubox-i 4x4. But it is hard to find good documentation about how to many things. Reading this forum and other webs I made many of my goals. After installing Debian from this web site and using the nand-sata-install script the system works from the hard drive. This hard drive has two partitions, the main and big one and one small, 4GB, swap partition, but the system is not using it, so I would like to know if I can make the system use it. I found this how to: 9. Setting Up Swap Space 9.1. Swap Files Normally, there are only two steps to setting up swap space, creating the partition and adding it to /etc/fstab. A typical fstab entry for a swap partition at /dev/hda6 would look like this: /dev/hda6 swap swap defaults 0 0 The next time you reboot, the initialization scripts will activate it automatically and there's nothing more to be done. However, if you want to make use of it right away, you'll need to activate it maually. As root, type: mkswap -f /dev/hda6 swapon /dev/hda6 9.2. Swap Files There might be times when you've run out of swap space and it is not practical to repartition a drive or add a new one. In this case, you can use a regular file in an ordinary partition. All you have to do is create a file of the size you want dd if=/dev/zero of=/var/my_swap bs=1024 count=131072 and activate it mkswap -f /var/my_swap swapon /var/my_swap This invocation creates a file called my_swap in /var. It is 128 Mb long (128 x 1024 = 131072). Initially, it is filled with zeros. However, mkswap marks it as swap space and swapon tells the kernel to start using it as swap space. When you are done with it, swapoff /var/my_swap rm /var/my_swap is it fine and how do I make it for my 4GB partition?
Igor Posted December 31, 2015 Posted December 31, 2015 Yes, this how-to is O.K. There is also one main fine tuning parameter to mention - called swappiness (/etc/sysctl.conf) Our images has only 128Mb swap for "just in case" since vm.swappiness=0 ... "it's not used unless really urgent". We run system from SD by default and you really don't want to swap to SD card. 1
Lothar Posted December 31, 2015 Author Posted December 31, 2015 Hi, After follow the how-to system doesn't start normally. I get this log: (I copy only half log... from errors mostly) . . . ene 01 01:00:04 cubox-i systemd-fstab-generator[134]: Failed to create mount unit file /run/systemd/generator/boot.mount, as it already exists. Duplicate entry in /etc/fstab? ene 01 01:00:04 cubox-i systemd[127]: /lib/systemd/system-generators/systemd-fstab-generator failed with error code 1. ene 01 01:00:04 cubox-i kernel: bonding: Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011) ene 01 01:00:04 cubox-i systemd-journal[157]: Journal started -- Subject: The Journal has been started -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- The system journal process has been starting up, opened the journal -- files for writing and is now ready to process requests. ene 01 01:00:04 cubox-i systemd-modules-load[146]: Module 'fuse' is builtin ene 01 01:00:04 cubox-i systemd-modules-load[146]: Inserted module 'bonding' ene 01 01:00:04 cubox-i systemd-udevd[168]: starting version 215 ene 01 01:00:04 cubox-i hdparm[171]: Setting parameters of disc: (none). ene 01 01:00:05 cubox-i kernel: IR keymap rc-rc6-mce not found ene 01 01:00:05 cubox-i kernel: Registered IR keymap rc-empty ene 01 01:00:05 cubox-i kernel: input: gpio_ir_recv as /devices/soc0/ir-receiver.23/rc/rc0/input2 ene 01 01:00:05 cubox-i kernel: rc0: gpio_ir_recv as /devices/soc0/ir-receiver.23/rc/rc0 ene 01 01:00:05 cubox-i kernel: IR NEC protocol handler initialized ene 01 01:00:05 cubox-i kernel: IR SANYO protocol handler initialized ene 01 01:00:05 cubox-i kernel: input: MCE IR Keyboard/Mouse (gpio-rc-recv) as /devices/virtual/input/input3 ene 01 01:00:05 cubox-i kernel: IR MCE Keyboard/mouse protocol handler initialized ene 01 01:00:05 cubox-i kernel: IR RC6 protocol handler initialized ene 01 01:00:05 cubox-i kernel: IR RC5(x) protocol handler initialized ene 01 01:00:05 cubox-i kernel: lirc_dev: IR Remote Control driver registered, major 241 ene 01 01:00:05 cubox-i kernel: IR JVC protocol handler initialized ene 01 01:00:05 cubox-i kernel: IR Sony protocol handler initialized ene 01 01:00:06 cubox-i kernel: rc rc0: lirc_dev: driver ir-lirc-codec (gpio-rc-recv) registered at minor = 0 ene 01 01:00:06 cubox-i kernel: IR LIRC bridge handler initialized ene 01 01:00:06 cubox-i kernel: cfg80211: Calling CRDA to update world regulatory domain ene 01 01:00:06 cubox-i kernel: brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Oct 25 2011 19:34:12 version 5.90.125.104 ene 01 01:00:06 cubox-i mtp-probe[252]: checking bus 2, device 4: "/sys/devices/soc0/soc.1/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb2/2-1/2-1.4/2-1.4.2" ene 01 01:00:06 cubox-i mtp-probe[252]: bus: 2, device: 4 was not an MTP device ene 01 01:00:07 cubox-i kernel: cfg80211: World regulatory domain updated: ene 01 01:00:07 cubox-i kernel: cfg80211: DFS Master region: unset ene 01 01:00:07 cubox-i kernel: cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp) ene 01 01:00:07 cubox-i kernel: cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm) ene 01 01:00:07 cubox-i kernel: cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm) ene 01 01:00:07 cubox-i kernel: cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm) ene 01 01:00:07 cubox-i kernel: cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2000 mBm) ene 01 01:00:07 cubox-i kernel: cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz), (N/A, 2000 mBm) ene 01 01:00:07 cubox-i kernel: cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm) ene 01 01:00:07 cubox-i kernel: cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm) ene 01 01:00:07 cubox-i kernel: cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm) ene 01 01:00:12 cubox-i keyboard-setup[170]: Setting preliminary keymap...done. ene 01 01:00:12 cubox-i kernel: EXT4-fs (sda1): re-mounted. Opts: commit=600,errors=remount-ro ene 01 01:00:12 cubox-i systemd[1]: media-mmc.mount: Directory /media/mmc to mount over is not empty, mounting anyway. -- Subject: Mount point is not empty -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- The directory /media/mmc is specified as the mount point (second field in -- /etc/fstab or Where= field in systemd unit file) and is not empty. -- This does not interfere with mounting, but the pre-exisiting files in -- this directory become inaccessible. To see those over-mounted files, -- please manually mount the underlying file system to a secondary -- location. ene 01 01:00:12 cubox-i systemd[1]: tmp.mount: Directory /tmp to mount over is not empty, mounting anyway. -- Subject: Mount point is not empty -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- The directory /tmp is specified as the mount point (second field in -- /etc/fstab or Where= field in systemd unit file) and is not empty. -- This does not interfere with mounting, but the pre-exisiting files in -- this directory become inaccessible. To see those over-mounted files, -- please manually mount the underlying file system to a secondary -- location. ene 01 01:00:12 cubox-i kernel: EXT4-fs (mmcblk0p1): recovery complete ene 01 01:00:12 cubox-i kernel: EXT4-fs (mmcblk0p1): mounted filesystem with writeback data mode. Opts: (null) ene 01 01:00:12 cubox-i kernel: Adding 131068k swap on /var/swap. Priority:-1 extents:3 across:212988k FS ene 01 01:00:13 cubox-i mount[349]: ntfs_mst_post_read_fixup_warn: magic: 0x00000000 size: 1024 usa_ofs: 0 usa_count: 65535: Invalid argument ene 01 01:00:13 cubox-i mount[349]: ntfs_mst_post_read_fixup_warn: magic: 0x00000000 size: 1024 usa_ofs: 0 usa_count: 65535: Invalid argument ene 01 01:00:13 cubox-i mount[349]: ntfs_mst_post_read_fixup_warn: magic: 0x00000000 size: 1024 usa_ofs: 0 usa_count: 65535: Invalid argument ene 01 01:00:13 cubox-i mount[349]: ntfs_mst_post_read_fixup_warn: magic: 0x00000000 size: 1024 usa_ofs: 0 usa_count: 65535: Invalid argument ene 01 01:00:13 cubox-i mount[349]: $MFTMirr does not match $MFT (record 0). ene 01 01:00:13 cubox-i mount[349]: Failed to mount '/dev/sda': Input/output error ene 01 01:00:13 cubox-i mount[349]: NTFS is either inconsistent, or there is a hardware fault, or it's a ene 01 01:00:13 cubox-i mount[349]: SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows ene 01 01:00:13 cubox-i mount[349]: then reboot into Windows twice. The usage of the /f parameter is very ene 01 01:00:13 cubox-i mount[349]: important! If the device is a SoftRAID/FakeRAID then first activate ene 01 01:00:13 cubox-i mount[349]: it and mount a different device under the /dev/mapper/ directory, (e.g. ene 01 01:00:13 cubox-i mount[349]: /dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation ene 01 01:00:13 cubox-i mount[349]: for more details. ene 01 01:00:13 cubox-i systemd[1]: media-500.mount mount process exited, code=exited status=13 ene 01 01:00:13 cubox-i systemd[1]: Failed to mount /media/500. -- Subject: Unit media-500.mount has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit media-500.mount has failed. -- -- The result is failed. ene 01 01:00:13 cubox-i systemd[1]: Dependency failed for Local File Systems. -- Subject: Unit local-fs.target has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit local-fs.target has failed. -- -- The result is dependency. ene 01 01:00:13 cubox-i systemd[1]: Unit media-500.mount entered failed state. ene 01 01:00:13 cubox-i systemd-journal[157]: Runtime journal is using 8.0M (max allowed 189.4M, trying to leave 284.2M free of 1.8G available → current limit 189.4M). ene 01 01:00:13 cubox-i kbd[368]: Setting console screen modes. ene 01 01:00:13 cubox-i kbd[368]: setterm: $TERM is not defined. ene 01 01:00:13 cubox-i dhclient[474]: Internet Systems Consortium DHCP Client 4.3.1 ene 01 01:00:13 cubox-i dhclient[474]: Copyright 2004-2014 Internet Systems Consortium. ene 01 01:00:13 cubox-i dhclient[474]: All rights reserved. ene 01 01:00:13 cubox-i dhclient[474]: For info, please visit https://www.isc.org/software/dhcp/ ene 01 01:00:13 cubox-i dhclient[474]: ene 01 01:00:13 cubox-i networking[370]: Configuring network interfaces...Internet Systems Consortium DHCP Client 4.3.1 ene 01 01:00:13 cubox-i networking[370]: Copyright 2004-2014 Internet Systems Consortium. ene 01 01:00:14 cubox-i networking[370]: All rights reserved. ene 01 01:00:14 cubox-i networking[370]: For info, please visit https://www.isc.org/software/dhcp/ ene 01 01:00:14 cubox-i kernel: fec 2188000.ethernet eth0: Freescale FEC PHY driver [Atheros 8035 ethernet] (mii_bus:phy_addr=2188000.ethernet:04, irq=-1) ene 01 01:00:14 cubox-i kernel: IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready ene 01 01:00:14 cubox-i dhclient[474]: Listening on LPF/eth0/d0:63:b4:00:82:93 ene 01 01:00:14 cubox-i dhclient[474]: Sending on LPF/eth0/d0:63:b4:00:82:93 ene 01 01:00:14 cubox-i dhclient[474]: Sending on Socket/fallback ene 01 01:00:14 cubox-i dhclient[474]: DHCPREQUEST on eth0 to 255.255.255.255 port 67 ene 01 01:00:14 cubox-i networking[370]: Listening on LPF/eth0/d0:63:b4:00:82:93 ene 01 01:00:14 cubox-i networking[370]: Sending on LPF/eth0/d0:63:b4:00:82:93 ene 01 01:00:14 cubox-i networking[370]: Sending on Socket/fallback ene 01 01:00:14 cubox-i networking[370]: DHCPREQUEST on eth0 to 255.255.255.255 port 67 ene 01 01:00:18 cubox-i kernel: libphy: 2188000.ethernet:04 - Link is Up - 1000/Full ene 01 01:00:18 cubox-i kernel: IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready ene 01 01:00:18 cubox-i systemd[371]: Failed at step EXEC spawning /bin/plymouth: No such file or directory -- Subject: Process /bin/plymouth could not be executed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- The process /bin/plymouth could not be executed and failed. -- -- The error number returned while executing this process is 2. ene 01 01:00:21 cubox-i dhclient[474]: DHCPREQUEST on eth0 to 255.255.255.255 port 67 ene 01 01:00:21 cubox-i networking[370]: DHCPREQUEST on eth0 to 255.255.255.255 port 67 ene 01 01:00:21 cubox-i dhclient[474]: DHCPACK from 192.168.1.1 ene 01 01:00:21 cubox-i networking[370]: DHCPACK from 192.168.1.1 ene 01 01:00:21 cubox-i console-setup[417]: Setting up console font and keymap...done. ene 01 01:09:38 cubox-i kernel: In DVI Mode disable interrupts ene 01 01:09:42 cubox-i x-session-manager[635]: WARNING: Could not connect to Systemd: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory ene 01 01:09:42 cubox-i x-session-manager[635]: WARNING: Could not connect to Systemd: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory ene 01 01:09:46 cubox-i gnome-keyring-daemon[665]: The SSH agent was already initialized ene 01 01:09:46 cubox-i gnome-keyring-daemon[665]: The PKCS#11 component was already initialized ene 01 01:09:46 cubox-i gnome-keyring-daemon[665]: The Secret Service was already initialized ene 01 01:09:46 cubox-i org.gtk.Private.UDisks2VolumeMonitor[657]: (process:704): GLib-GObject-WARNING **: invalid (NULL) pointer instance ene 01 01:09:46 cubox-i org.gtk.Private.UDisks2VolumeMonitor[657]: (process:704): GLib-GObject-CRITICAL **: g_signal_handlers_disconnect_matched: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed ene 01 01:09:46 cubox-i org.gtk.Private.UDisks2VolumeMonitor[657]: (process:704): GLib-GObject-WARNING **: invalid (NULL) pointer instance ene 01 01:09:46 cubox-i org.gtk.Private.UDisks2VolumeMonitor[657]: (process:704): GLib-GObject-CRITICAL **: g_signal_handlers_disconnect_matched: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed ene 01 01:09:46 cubox-i org.gtk.Private.UDisks2VolumeMonitor[657]: (process:704): GLib-GObject-WARNING **: invalid (NULL) pointer instance ene 01 01:09:46 cubox-i org.gtk.Private.UDisks2VolumeMonitor[657]: (process:704): GLib-GObject-CRITICAL **: g_signal_handlers_disconnect_matched: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed ene 01 01:09:46 cubox-i org.gtk.Private.UDisks2VolumeMonitor[657]: (process:704): GLib-GObject-WARNING **: invalid (NULL) pointer instance ene 01 01:09:46 cubox-i org.gtk.Private.UDisks2VolumeMonitor[657]: (process:704): GLib-GObject-CRITICAL **: g_signal_handlers_disconnect_matched: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed ene 01 01:09:46 cubox-i org.gtk.Private.UDisks2VolumeMonitor[657]: (process:704): GLib-GObject-WARNING **: invalid (NULL) pointer instance ene 01 01:09:46 cubox-i org.gtk.Private.UDisks2VolumeMonitor[657]: (process:704): GLib-GObject-CRITICAL **: g_signal_handlers_disconnect_matched: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed ene 01 01:09:46 cubox-i org.gtk.Private.UDisks2VolumeMonitor[657]: (process:704): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed ene 01 01:09:46 cubox-i org.gtk.Private.UDisks2VolumeMonitor[657]: (process:704): GVFS-RemoteVolumeMonitorDaemon-WARNING **: monitor says it's not supported ene 01 01:09:46 cubox-i org.gtk.Private.UDisks2VolumeMonitor[657]: (process:704): GVFS-RemoteVolumeMonitorDaemon-WARNING **: monitor says it's not supported ene 01 01:09:46 cubox-i org.gtk.Private.AfcVolumeMonitor[657]: Volume monitor alive ene 01 01:09:47 cubox-i org.gtk.Private.UDisks2VolumeMonitor[657]: (process:704): GVFS-RemoteVolumeMonitorDaemon-WARNING **: monitor says it's not supported ene 01 01:09:48 cubox-i gnome-keyring-daemon[665]: The GPG agent was already initialized ene 01 01:09:50 cubox-i org.gtk.Private.UDisks2VolumeMonitor[657]: (process:704): GVFS-RemoteVolumeMonitorDaemon-WARNING **: monitor says it's not supported ene 01 01:09:51 cubox-i org.a11y.Bus[657]: Activating service name='org.a11y.atspi.Registry' ene 01 01:09:52 cubox-i org.a11y.Bus[657]: Successfully activated service 'org.a11y.atspi.Registry' ene 01 01:09:52 cubox-i org.a11y.atspi.Registry[778]: SpiRegistry daemon is running with well-known name - org.a11y.atspi.Registry ene 01 01:09:53 cubox-i x-session-manager[635]: WARNING: Could not connect to Systemd: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory ene 01 01:09:53 cubox-i x-session-manager[635]: WARNING: Could not connect to Systemd: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory ene 01 01:09:54 cubox-i org.mate.panel.applet.ClockAppletFactory[657]: ** (clock-applet:747): WARNING **: Couldn't connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory ene 01 01:14:39 cubox-i x-session-manager[635]: WARNING: Could not connect to Systemd: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory ene 01 01:16:42 cubox-i kernel: usb 2-1.2: new high-speed USB device number 5 using ci_hdrc ene 01 01:16:42 cubox-i kernel: usb 2-1.2: New USB device found, idVendor=0951, idProduct=1666 ene 01 01:16:42 cubox-i kernel: usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 ene 01 01:16:42 cubox-i kernel: usb 2-1.2: Product: DataTraveler 3.0 ene 01 01:16:42 cubox-i kernel: usb 2-1.2: Manufacturer: Kingston ene 01 01:16:42 cubox-i kernel: usb 2-1.2: SerialNumber: 60A44C3FAFE1BEB0D96D02CF ene 01 01:16:42 cubox-i kernel: usb-storage 2-1.2:1.0: USB Mass Storage device detected ene 01 01:16:42 cubox-i kernel: scsi1 : usb-storage 2-1.2:1.0 ene 01 01:16:42 cubox-i mtp-probe[795]: checking bus 2, device 5: "/sys/devices/soc0/soc.1/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb2/2-1/2-1.2" ene 01 01:16:42 cubox-i mtp-probe[795]: bus: 2, device: 5 was not an MTP device ene 01 01:16:43 cubox-i kernel: scsi 1:0:0:0: Direct-Access Kingston DataTraveler 3.0 PMAP PQ: 0 ANSI: 6 ene 01 01:16:43 cubox-i kernel: sd 1:0:0:0: Attached scsi generic sg1 type 0 ene 01 01:16:44 cubox-i kernel: sd 1:0:0:0: [sdb] 15155200 512-byte logical blocks: (7.75 GB/7.22 GiB) ene 01 01:16:44 cubox-i kernel: sd 1:0:0:0: [sdb] Write Protect is off ene 01 01:16:44 cubox-i kernel: sd 1:0:0:0: [sdb] Mode Sense: 23 00 00 00 ene 01 01:16:44 cubox-i kernel: sd 1:0:0:0: [sdb] No Caching mode page found ene 01 01:16:44 cubox-i kernel: sd 1:0:0:0: [sdb] Assuming drive cache: write through ene 01 01:16:44 cubox-i kernel: sd 1:0:0:0: [sdb] No Caching mode page found ene 01 01:16:44 cubox-i kernel: sd 1:0:0:0: [sdb] Assuming drive cache: write through ene 01 01:16:44 cubox-i kernel: sdb: sdb1 ene 01 01:16:44 cubox-i kernel: sd 1:0:0:0: [sdb] No Caching mode page found ene 01 01:16:44 cubox-i kernel: sd 1:0:0:0: [sdb] Assuming drive cache: write through ene 01 01:16:44 cubox-i kernel: sd 1:0:0:0: [sdb] Attached SCSI removable disk ene 01 01:16:46 cubox-i x-session-manager[635]: WARNING: Could not connect to Systemd: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory ene 01 01:17:05 cubox-i kernel: usb 2-1.1: new low-speed USB device number 6 using ci_hdrc ene 01 01:17:05 cubox-i kernel: usb 2-1.1: New USB device found, idVendor=15d9, idProduct=0a4c ene 01 01:17:05 cubox-i kernel: usb 2-1.1: New USB device strings: Mfr=0, Product=1, SerialNumber=0 ene 01 01:17:05 cubox-i kernel: usb 2-1.1: Product: USB OPTICAL MOUSE ene 01 01:17:05 cubox-i kernel: input: USB OPTICAL MOUSE as /devices/soc0/soc.1/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb2/2-1/2-1.1/2-1.1:1.0/0003:15D9:0A4C.0003/input/input4 ene 01 01:17:05 cubox-i kernel: hid-generic 0003:15D9:0A4C.0003: input,hidraw2: USB HID v1.11 Mouse [ USB OPTICAL MOUSE] on usb-ci_hdrc.1-1.1/input0 ene 01 01:17:05 cubox-i mtp-probe[823]: checking bus 2, device 6: "/sys/devices/soc0/soc.1/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb2/2-1/2-1.1" ene 01 01:17:05 cubox-i mtp-probe[823]: bus: 2, device: 6 was not an MTP device And just waits for root loging.... I deleted the line "/dev/sda2 swap swap defaults 0 0" from /etc/fstab but same result....
zador.blood.stained Posted December 31, 2015 Posted December 31, 2015 Can you please post here contents of your fstab? If you can login at the end of the boot (emergency shell), post here output of "systemctl --failed".
Lothar Posted December 31, 2015 Author Posted December 31, 2015 this is the message: UNIT LOAD ACTIVE SUB DESCRIPTION * media-500.mount loaded failed failed /media/500 LOAD = Reflects whether the unit definition was properly loaded. ACTIVE = The high-level unit activation state, i.e. generalization of SUB. SUB = The low-level unit activation state, values depend on unit type. 1 loaded units listed. Pass --all to see loaded but inactive units, too. To show all installed unit files use 'systemctl list-unit-files'.
zador.blood.stained Posted December 31, 2015 Posted December 31, 2015 I suspect something is still wrong in your fstab, can you post its contents here? Output of "cat /etc/fstab"
Lothar Posted December 31, 2015 Author Posted December 31, 2015 ok... this is the content: # /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump> <pass> tmpfs /tmp tmpfs nodev,nosuid,size=256M 0 0 /dev/sda1 / ext4 defaults,noatime,nodiratime,commit=600,errors=remount-ro 0 0 /dev/mmcblk0p1 /boot ext4 defaults,relatime 0 0 /dev/mmcblk0p1 /media/mmc ext4 defaults 0 0 /dev/sda /media/500 ntfs-3g defaults,locale=es_ES@euro 0 0 /var/swap none swap sw 0 0 /media/mmc/boot /boot none bind 0 0 /dev/disk/by-id/usb-WD_Elements_1042_57584E314533324D59595856-0:0 /mnt/usb-WD_Elements_1042_57584E314533324D59595856-0:0 auto nosuid,nodev,nofail,noauto,x-gvfs-show,ro 0 0
zador.blood.stained Posted December 31, 2015 Posted December 31, 2015 /dev/sda /media/500 ntfs-3g defaults,locale=es_ES@euro 0 0 I think you accidentally deleted partition number from first string (/dev/sdaX) and now kernel is trying to mount entire physical disk as NTFS partition, which obviously won't work.
Lothar Posted December 31, 2015 Author Posted December 31, 2015 Ok, so this is what a I think a serie of mistakes were made.... first partition had at the moment of instalation the label "500", I think... but before to start to make changes in the system I edited it and changed it to "/"... sda1 is the first partition and sda2 the second one, the Swap. I got this output: # /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump> <pass> tmpfs /tmp tmpfs nodev,nosuid,size=256M 0 0 /dev/sda1 / ext4 defaults,noatime,nodiratime,commit=600,errors=remount-ro 0 0 /dev/mmcblk0p1 /boot ext4 defaults,relatime 0 0 /dev/mmcblk0p1 /media/mmc ext4 defaults 0 0 /dev/sda /media/500 ntfs-3g defaults,locale=es_ES@euro 0 0 /var/swap none swap sw 0 0 /media/mmc/boot /boot none bind 0 0 /dev/disk/by-id/usb-WD_Elements_1042_57584E314533324D59595856-0:0 /mnt/usb-WD_Elements_1042_57584E314533324D59595856-0:0 auto nosuid,nodev,nofail,noauto,x-gvfs-show,ro 0 0 but same error loading the system... root@cubox-i:~# systemctl status media-500.mount * media-500.mount - /media/500 Loaded: loaded (/etc/fstab) Active: failed (Result: exit-code) since jue 1970-01-01 01:00:12 CET; 6min ago Where: /media/500 What: /dev/sda1 Docs: man:fstab(5) man:systemd-fstab-generator(8) Process: 375 ExecMount=/bin/mount -n /dev/sda1 /media/500 -t ntfs-3g -o defaults,locale=es_ES@euro (code=exited, status=12) ene 01 01:00:12 cubox-i mount[375]: NTFS signature is missing. ene 01 01:00:12 cubox-i mount[375]: Failed to mount '/dev/sda1': Invalid ar...nt ene 01 01:00:12 cubox-i mount[375]: The device '/dev/sda1' doesn't seem to ...S. ene 01 01:00:12 cubox-i mount[375]: Maybe the wrong device is used? Or the ... a ene 01 01:00:12 cubox-i mount[375]: partition (e.g. /dev/sda, not /dev/sda1...d? ene 01 01:00:12 cubox-i systemd[1]: media-500.mount mount process exited, c...12 ene 01 01:00:12 cubox-i systemd[1]: Failed to mount /media/500. ene 01 01:00:12 cubox-i systemd[1]: Unit media-500.mount entered failed state. Hint: Some lines were ellipsized, use -l to show in full. and changing "/dev/sda /media/500 ntfs-3g defaults,locale=es_ES@euro 0 0" to "/dev/sda1 /media/500 ntfs-3g defaults,locale=es_ES@euro 0 0" and the label of the first partition to "500" just made it worse.... :'(
zador.blood.stained Posted December 31, 2015 Posted December 31, 2015 /dev/sda1 is already defined as your ext4 root partition. /dev/sda1 / ext4 defaults,noatime,nodiratime,commit=600,errors=remount-ro 0 0 You should probably comment out line with ntfs filesystem and deal with it later.
Lothar Posted December 31, 2015 Author Posted December 31, 2015 Ok, you were right.... I commented out that line and everything went back to normal... Thank you very much.
Dombo 71 Posted August 27, 2017 Posted August 27, 2017 old topic only this part is what i found... I run armbian [ latest ] on my Cb2 i need some memory so i think when i make swap i have more? My sd is 64gb so i hope i can use some from that. When i use Htop is see there is a swap: Only i am a noob, so i do not now or the swap is active? How can i enlarge the swap And are there more settings i need to set? Hope you will help me... Thanks ps: Is it not strange that there are serval minecraft things running?
martinayotte Posted August 27, 2017 Posted August 27, 2017 Easier way to see the swap size is the "free" command. To locate de swap file, check it path in "fstab" Turn off the current swap with "swapoff /var/swap". Overwrite existing one by creating a larger one on the same path with "dd if=/dev/zero of=/var/swap bs=1024 count=524288". Turn the new file into a swap file with "mkswap /var/swap" and turn it on with "swapon /var/swap".
Dombo 71 Posted September 2, 2017 Posted September 2, 2017 On 27-8-2017 at 2:25 PM, martinayotte said: Easier way to see the swap size is the "free" command. To locate de swap file, check it path in "fstab" Turn off the current swap with "swapoff /var/swap". Overwrite existing one by creating a larger one on the same path with "dd if=/dev/zero of=/var/swap bs=1024 count=524288". Turn the new file into a swap file with "mkswap /var/swap" and turn it on with "swapon /var/swap". Dear... Thanks for the help... Only i am a noob..... Please can you tell me how to in simple steps... And the most important.. Can i brick or do something wrong??
martinayotte Posted September 2, 2017 Posted September 2, 2017 The "simple steps" were already described above ... - "swapoff /var/swap" - "dd if=/dev/zero of=/var/swap bs=1024 count=524288" - "mkswap /var/swap" -"swapon /var/swap"
Dombo 71 Posted September 2, 2017 Posted September 2, 2017 mmm is this ok? root@bananapim2:~# free -h total used free shared buffers cached Mem: 1.0G 933M 67M 17M 16M 195M -/+ buffers/cache: 721M 279M Swap: 127M 0B 127M root@bananapim2:~# swapoff /var/swap root@bananapim2:~# dd if=/dev/zero of=/var/swap bs=1024 count=524288 524288+0 records in 524288+0 records out 536870912 bytes (537 MB) copied, 44.0321 s, 12.2 MB/s root@bananapim2:~# mkswap /var/swap Setting up swapspace version 1, size = 524284 KiB no label, UUID=fe0acba4-4629-4ff7-ac92-0f430d9cf57a root@bananapim2:~# swapon /var/swap root@bananapim2:~# free -h total used free shared buffers cached Mem: 1.0G 987M 13M 17M 12M 249M -/+ buffers/cache: 725M 275M Swap: 511M 0B 511M root@bananapim2:~# Looks ok by my.... Only what did i ? And what are the better specs @ this moment looking @ the config before??? Do i have more RAM? Or what is the swapfile doing??? :-)
Igor Posted September 3, 2017 Posted September 3, 2017 11 hours ago, Dombo 71 said: Or what is the swapfile doing? It's doing nothing and this is good thing Swapping at Armbian is set to "emergency only" which means it will use swap file only there will be no other options. Swap only prevent strange things to happen - it's your virtual memory extension which is damn slow. If you need more memory, get a board with more of it.
Dombo 71 Posted September 3, 2017 Posted September 3, 2017 so i think i never see the swap memory is in use.... When i see it is in use, the Bpi have problems? .:-)
Igor Posted September 3, 2017 Posted September 3, 2017 5 minutes ago, Dombo 71 said: When i see it is in use, the Bpi have problems? This means two things: there is something wrong or you are just trying to squeeze too much out of the poor board. Don't worry.
Dombo 71 Posted September 3, 2017 Posted September 3, 2017 THANKS for the great work!! Armbian is a nice OS!! [ only my network connect problem is grrrrr. ]
tkaiser Posted September 3, 2017 Posted September 3, 2017 12 hours ago, Dombo 71 said: mmm is this ok? No, this is wrong in many ways (due to 'tutorials/recommendations on the Internet' being copy&paste of horribly outdated stuff again and again). You're not running out of physical memory (0 bytes swap used out of 128MB before and now 512MB) so why do you care at all? Use fallocate and not dd to create a swapfile Use zram instead of swap (it's 2017 and swap on SD cards is insane anyway)
Dombo 71 Posted September 3, 2017 Posted September 3, 2017 mmm guys you make me crazy on a nice way:-) Good not good... My bpi runs a minecraft server for my kids... Works very fine.... Only i now the bpi dos not have a lot of memory... My SD cart is 64gb so there is more then i need... So i read something about a swap file. I think great when the server is running to the max memory is can get some from the sd with a swapfile... And so i can run the server on a perhaps to light board... and the swap help me when there are temperaly problems with the memory.... So i this correct? Now you guys are all pro's.. I am house builder [ bricklayer ] , that wil get my kids happy with a great toy, what other kids do not have,..[ their own server ] Hobby, and i learn something about linux... I am from the sixties, so no pc expert 2 all... :-) i can run a windows pc... :-( I am very happy with all your support.. Only i hope you will give me some more then only a link to a script .. That script i cannot read? Or i do not now what i can do with it.. I am very happy that i make the swap memory greater,..... [ i think ] Now i hope the bpi is going to use it... So please... some simple help step by step.. Thanks, form my 4 kids xxxx
tkaiser Posted September 3, 2017 Posted September 3, 2017 1 hour ago, Dombo 71 said: So i read something about a swap file. And that's the mistake. Simply FORGET about swap. It doesn't increase your useable memory and as soon as your board would start to swap it's already over since performance will suck so horribly that it's time to think about a board with more DRAM. Do you need more DRAM? NO according to 'free' output above. You RAM is mostly used for buffers/caches which would be freed immediately once really needed by the kernel or an application. You do NOT have to worry about swap, swap doesn't help with 'increasing memory' and 'more memory' is also useless for your use case. So simply stop thinking about swap (and if you would need swap since you're running out of physical memory increasing a swap file/partition is close to stupid since swapping on SD card is slow as hell -- use zram instead IF it would be necessary which is it NOT). The only reasonable answer we as Armbian team should give to people asking about 'increasing swap?' is 'forget about, it's useless!'. And if users are running out of physical memory the only reasonable recommendations are 1) try zram and 2) try a board with more physical memory.
Dombo 71 Posted September 3, 2017 Posted September 3, 2017 Thanks.... Very clear how you tell this... I let the swap behind me... Sorry for your time.!!!
tkaiser Posted September 3, 2017 Posted September 3, 2017 1 hour ago, Dombo 71 said: Sorry for your time No time wasted! I thought today a little bit about why Armbian ships with such an anachronistic default configuration and whether it would be worth a try with more recent kernels to switch from swap to zram (and adjust vm swappiness since with vm.swappiness=0 most probably no one will ever see a difference). An interesting test would be sed -i 's/vm.swappiness=0/vm.swappiness=60/' /etc/sysctl.conf FILE=$(mktemp) wget https://mirrors.kernel.org/ubuntu/pool/universe/z/zram-config/zram-config_0.5_all.deb -qO $FILE && dpkg -i $FILE reboot But I've to admit that I don't know how to test whether something changes since I know swapping only as problem of the past. I've now 3 ROCK64 with different DRAM sizes. Maybe someone has an idea how a useful 'benchmark' could look like comparing different DRAM sizes? 2
Recommended Posts