I'm trying to install tensorflow on a Amazon linux AMI EC2 micro instance, but I keep getting EnvironmentError: [Errno 28] No space left on device even while the disk is empty.
On ubuntu server, I fix this increasing the /tmp size with the command sudo mount -o remount,size=4G,noatime /tmp, however this command fails on Amazon Linux telling me that /tmp is not mounted at all.
How can I increase /tmp size on Amazon Linux 2?
Thx!
Following can help in achieving the tmp space.
cd # change to your home directory
fallocate -l 20G mydrive.img # create the virtual drive file
mkfs -t ext3 mydrive.img # format the virtual drive
sudo umount /tmp # unmount the /tmp
sudo mount -t auto -o loop mydrive.img /tmp # mount the virtual drive
Related
I'm trying to deploy some binary files to /boot in a Yocto image for RPi CM3 but it deploys them to the wrong location.
do_install() {
install -d ${D}/boot/overlays
install -m 0664 ${WORKDIR}/*.dtb ${D}/boot/overlays/
install -m 0664 ${WORKDIR}/*.dtbo ${D}/boot/overlays/
}
The files are deployed to /boot in the / partition of the final image, but not to the /boot partition. So they are not available at boot time.
I already googled and studied the kernel recipes (and classes) of the Poky distribution but I didn't find the mechanism it uses how to ensure that the files are deployed to the boot image (and not to the /boot dir in the root image).
Any help is appreciated :)
Update #1
In my local.conf I did:
IMAGE_BOOT_FILES_append = " \
overlays/3dlab-nano-player.dtbo \
overlays/adau1977-adc.dtbo \
...
"
And in my rpi3-overlays.bb
do_deploy() {
install -d ${DEPLOYDIR}/${PN}
install -m 0664 ${WORKDIR}/*.dtb ${DEPLOYDIR}/${PN}
install -m 0664 ${WORKDIR}/*.dtbo ${DEPLOYDIR}/${PN}
touch ${DEPLOYDIR}/${PN}/${PN}-${PV}.stamp
}
Using this the image builds, but the files stillt don't get deployed in the /boot partition.
Using RPI_KERNEL_DEVICETREE_OVERLAYS I get a build error because the kernel recipe tries to build the dtbo files like dts files.
RPI images are created with sdimage-raspberrypi.wks WIC wks file. It contains:
part /boot --source bootimg-partition ...
so it uses bootimg-partition.py wic plugin to generate /boot partition. It copies every files defined by IMAGE_BOOT_FILES variable.
It seems you want to add some devicetree overlays, so you need to modify machine configuration and more specifically RPI_KERNEL_DEVICETREE_OVERLAYS variable. IMAGE_BOOT_FILES variable is set in rpi-base.inc.
If you don't have any custom machine or custom distro defined, you can add it in local.conf:
RPI_KERNEL_DEVICETREE_OVERLAYS_append = " <deploy-path>/<dto-path>"
You can see here how to add files in deploy directory.
After too many hours of investigation it turned out, that deploying files to other partitions than / is not easily possible. I now went the way of a post-processing script that mounts the final image, deploys the additional files and unmounts it.
# Ensure the first loopback device is free to use
sudo -n losetup -d /dev/loop0 || true
# Create a loopback device for the given image
sudo -n losetup -Pf ../deploy/images/bapi/ba.rootfs.rpi-sdimg
# Mount the loopback device
mkdir -p tmp
sudo -n mount /dev/loop0p1 tmp
# Deploy files
sudo -n cp -n ../../meta-ba-rpi-cm3/recipes-core/rpi3-overlays/files/* tmp/overlays/
sudo -n cp ../../conf/config.txt tmp/config.txt
sudo -n cp ../../conf/cmdline.txt tmp/cmdline.txt
# Unmount the image and free the loopback device
sudo -n umount tmp
sudo -n losetup -d /dev/loop0
As you can see /dev/sda is mounted to /. Thats where /tmp/ is located as shown image. Since It is running out of space on my / partition,I can't install caffe, and there is error: No space left on device.
Now I want to create a new partition on /dev/sdb1 (which still has 1.5tb of free space) and mount it on /tmp/.
Could you guys tell me how to create a new partition for solving this issue by linux command.
thanks
Just give the following command
To unmont the existing volume give the following
sudo umount /dev/sdb1
Note:- Make sure no process is using the particular directory
Then again mount it to /tmp
sudo mount /dev/sdb1 /tmp
or
cd /dev/ && sudo mount sdb1 /tmp
I'm on Ubuntu 14.04.
I try to make an incremental backup of some files on my Ubuntu HD (ext4) to a Buffalo network HD (XFS).
My script mounts the Buffalo HD with this command :
sudo mount.cifs //192.168.1.12/Sauvegardes /mnt/Sauvegardes -o username=myusername,password=mypassword
After the disk is mounted, I use rsync trying to make an incremental backup with rsync and --link-dest. Each day, when the script is launched, all the folders change according to actual date of the day. Here is an example when the script is launched on 2017-03-09. It should check on 2017-03-08 backup if files already exist :
sudo rsync -arR --link-dest="/mnt/Sauvegardes/racine_2017-03-08" --timeout=30 /home/flooder/Sauvegardes/ /mnt/Sauvegardes/racine_2017-03-09/
The problem : rsync doesn't seem to check on the --link-dest destination. It copies all the files all the day. So the disk will be full quickly and the backup is very very long each day...
Would you have an idea for me?
Should I mount the network drive an other way?
Do I have the right rsync command?
I have mounted my network disk with this line instead. It works well now. If the file already exists in --link-dest, only an hard link is created. Second pass is very very quick!
sudo mount -t cifs //192.168.1.12/Sauvegardes /mnt/Sauvegardes -o username=myusername,password=mypassword,uid=1000,gid=1000
uid and gid are those of my logged user.
I was trying to extract a vmdk file using poweriso in linux mint by using the following command,
poweriso extract sample-disk1.vmdk / -od /home/local/test/VMDK/extracted/
But, I am getting the following error ,
PowerISO Copyright(C) 2004-2008 PowerISO Computing, Inc
Type poweriso -? for help
sample-disk1.vmdk: The file format is invalid or unsupported.
According to the documentation here power iso supports vmdk file,
Support all popular virtual disc image files, such as VMWare Virtual Disc Images(*.vmdk), VirtualBox Virtual Disc Images(*.vdi), Virtual PC Virtual Disc Images(*.vdi).
How can I extract a vmdk file using power iso?
I am providing information which I used to mount the qcow2 image and I hope the same will apply for vmdk too.
Installation of GuestFish
$> apt-get install libguestfs-tools
Mount qcow2 image
$> guestfish
Welcome to guestfish, the guest filesystem shell for
editing virtual machine filesystems and disk images.
Type: 'help' for help on commands
'man' to read the manual
'quit' to quit the shell
><fs> add vAP.qcow2
><fs> run
><fs> list-filesystems
/dev/sda1: ext2
/dev/sda2: ext2
/dev/sda3: ext2
/dev/sda4: reiserfs
><fs> mount /dev/sda2 /
><fs> ls /
.ash_history
.rnd
.ssh
ash_env
bin
boot
bzImage
custom
defaults
dev
><fs> umount /
><fs> exit
You can make use of copy-in and copy-out to copy files from vmdk to host and vice versa
Environment is in virtual box,ubuntu 12.04. It has 2 disks, /dev/sda1 and /dev/sdb1 are both ext4 type filesystem.
Since /dev/sdb1 is add after system installed, so I want to mount it manually. I'd try this command:
sudo mount -o user,defaults /dev/sdb1 ~/project
No errors report. Then I get mount info by mount:
/dev/sdb1 on /home/igsrd/project rw,noexec,nosuid,nodev
But when I ls -l to see /home/igsrd I found its permission is still belongs root, so I can't touch anything in it. Why it still belongs root?
I have another machine running ubuntu 12.04,too. I mount another partition with same option will be fine, correct permission(ownership). Are any differences between them?
*nix permissions on a filesystem that supports them natively, e.g. ext4, will be maintained regardless of how it is mounted when using a proper filesystem driver, e.g. the native ext4 driver built into Linux.
Why don't you just (while still root) do this:
chown -R <your-user-name> ~<your-user-name>/project
?