Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
1
votes
1
answers
1011
views
Error with grub2-install on Amazon Linux 2023 after Migrating to LVM with EFI System
I set up an Amazon Linux 2023 EC2 and migrated the disk over to a new one to use LVM, (I didnt put the BIOS and `/boot/efi` on LVM.) I believe my system is using EFI, as indicated by the contents in `/sys/firmware/efi/`, but I'm facing an error with `grub2-install`. Here's the sequence of commands I...
I set up an Amazon Linux 2023 EC2 and migrated the disk over to a new one to use LVM, (I didnt put the BIOS and
/boot/efi
on LVM.) I believe my system is using EFI, as indicated by the contents in /sys/firmware/efi/
, but I'm facing an error with grub2-install
.
Here's the sequence of commands I ran:
grub2-mkconfig -o /boot/grub2/grub.cfg
dracut -f -H --regenerate-all
grub2-install --recheck /dev/nvme1n1p2
However grub2-install
fails with the following error:
Generating grub configuration file ...
done
grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory.
allyman17
(29 rep)
Mar 12, 2024, 07:00 AM
• Last activity: Mar 12, 2024, 02:49 PM
2
votes
2
answers
3708
views
AWS s3 CLi grep command with special characters
I want to copy the whole log that are stored in the AWS S3 bucket if the following line is present: ``` \"Key\" : 951332,\n ``` I've tried escaping by trying this: ``` aws s3 ls s3://bucket_name | grep "/\"Key/\" : 951332,/\n" --recursive ``` but not getting anything back, does anyone know how I can...
I want to copy the whole log that are stored in the AWS S3 bucket if the following line is present:
\"Key\" : 951332,\n
I've tried escaping by trying this:
aws s3 ls s3://bucket_name | grep "/\"Key/\" : 951332,/\n" --recursive
but not getting anything back, does anyone know how I can run the grep in this manner?
Samosa
(81 rep)
Sep 2, 2019, 12:05 PM
• Last activity: Nov 10, 2023, 03:18 PM
1
votes
1
answers
1786
views
Can't access Webmin from browser after installing
Fresh Webmin install on Ubuntu 20.04 on Amazon Lightsail * I added the line to `iptables` as per their instructions: ``` sudo iptables -A INPUT -p tcp -m tcp --dport 10000 -j ACCEPT ``` * I have added port `10000/tcp` to `ufw` also. * When I go to the browser https://myip:10000 the browser stays loa...
Fresh Webmin install on Ubuntu 20.04 on Amazon Lightsail
* I added the line to
iptables
as per their instructions:
sudo iptables -A INPUT -p tcp -m tcp --dport 10000 -j ACCEPT
* I have added port 10000/tcp
to ufw
also.
* When I go to the browser https://myip:10000 the browser stays loading for a while then says:
cant open the page because the server where this page is located isn't responding
What am I missing?
**Edit:**
When I run sudo service webmin status
I get this:
● webmin.service - LSB: web-based administration interface for Unix systems
Loaded: loaded (/etc/init.d/webmin; generated)
Active: active (exited) since Thu 2021-02-04 00:52:06 UTC; 55min ago
Docs: man:systemd-sysv-generator(8)
Feb 04 00:52:05 ip-172-26-4-221 systemd: Starting LSB: web-based administration interface for Unix systems...
Feb 04 00:52:05 ip-172-26-4-221 perl: pam_unix(webmin:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost= user=root
Feb 04 00:52:06 ip-172-26-4-221 webmin: Webmin starting
Feb 04 00:52:06 ip-172-26-4-221 systemd: Started LSB: web-based administration interface for Unix systems.
lines 1-9/9 (END)
pyproper
(21 rep)
Feb 4, 2021, 01:36 AM
• Last activity: Jun 13, 2022, 05:48 AM
0
votes
2
answers
1529
views
"Warning: bad syntax, perhaps a bogus '-'?" has started to appear when connecting to server
I am suddenly seeing the following warning when I ssh to my server. I researched it and cannot seem to find the cause neither I am able to get rid of it. Please, can someone help? [![enter image description here][1]][1] [1]: https://i.sstatic.net/PRKJ7.png Thank you!
I am suddenly seeing the following warning when I ssh to my server. I researched it and cannot seem to find the cause neither I am able to get rid of it.
Please, can someone help?
Thank you!

PtiSinge
(3 rep)
Aug 25, 2021, 01:17 PM
• Last activity: Dec 3, 2021, 08:24 PM
0
votes
2
answers
1784
views
How to install open connect client on Amazon linux
sudo yum list all | grep openconnect NetworkManager-openconnect.x86_64 0.8.6.0-3.el6 epel openconnect.i686 7.07-2.el6 epel openconnect.x86_64 7.07-2.el6 epel openconnect-devel.i686 7.07-2.el6 epel openconnect-devel.x86_64 7.07-2.el6 epel Tried to install NetworkManager-openconnect sudo yum install N...
sudo yum list all | grep openconnect
NetworkManager-openconnect.x86_64 0.8.6.0-3.el6 epel
openconnect.i686 7.07-2.el6 epel
openconnect.x86_64 7.07-2.el6 epel
openconnect-devel.i686 7.07-2.el6 epel
openconnect-devel.x86_64 7.07-2.el6 epel
Tried to install NetworkManager-openconnect
sudo yum install NetworkManager-openconnect
Ended up in dependencies error.
Error: Package: NetworkManager-openconnect-0.8.6.0-3.el6.x86_64 (epel)
Requires: libgnome-keyring.so.0()(64bit)
Error: Package: NetworkManager-openconnect-0.8.6.0-3.el6.x86_64 (epel)
Requires: NetworkManager >= 1:0.8.1
Error: Package: NetworkManager-openconnect-0.8.6.0-3.el6.x86_64 (epel)
Requires: libgdk-x11-2.0.so.0()(64bit)
Error: Package: openconnect-7.07-2.el6.x86_64 (epel)
Requires: libpcsclite.so.1()(64bit)
Error: Package: NetworkManager-openconnect-0.8.6.0-3.el6.x86_64 (epel)
Requires: libgconf-2.so.4()(64bit)
Error: Package: NetworkManager-openconnect-0.8.6.0-3.el6.x86_64 (epel)
Requires: libnm-util.so.1()(64bit)
Error: Package: NetworkManager-openconnect-0.8.6.0-3.el6.x86_64 (epel)
Requires: libgtk-x11-2.0.so.0()(64bit)
Error: Package: NetworkManager-openconnect-0.8.6.0-3.el6.x86_64 (epel)
Requires: libgdk_pixbuf-2.0.so.0()(64bit)
Error: Package: NetworkManager-openconnect-0.8.6.0-3.el6.x86_64 (epel)
Requires: libnm-glib-vpn.so.1()(64bit)
Error: Package: NetworkManager-openconnect-0.8.6.0-3.el6.x86_64 (epel)
Requires: libnm-glib.so.2()(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Can you please try to help me to install occlient on Amazon linux?
sai
(1 rep)
Apr 26, 2018, 01:58 PM
• Last activity: Dec 17, 2020, 04:33 PM
2
votes
1
answers
1340
views
yum IUS in Amazon Linux 2
As I'll need to install the layrst version of Python, will need to install a particular repository - Inline with Upstream Stable (IUS) - that provides rpm packages for new versions of selected software. If I was using CentOS 7, would run yum -y install https://centos7.iuscommunity.org/ius-release.rp...
As I'll need to install the layrst version of Python, will need to install a particular repository - Inline with Upstream Stable (IUS) - that provides rpm packages for new versions of selected software.
If I was using CentOS 7, would run
yum -y install https://centos7.iuscommunity.org/ius-release.rpm
and then for installing Python would do something like
yum -y install python36u
If I try to run the initial command, then I get in the first command
> Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
>
> Cannot open: https://centos7.iuscommunity.org/ius-release.rpm . Skipping.
>
> Error: Nothing to do
and in the second
> Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core | 3.7 kB 00:00:00
>
> No package python36u available.
> Error: Nothing to do
All in all,
----------
Considering I'm now using Amazon Linux 2,
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/ "
what would be the equivalent commands for Amazon Linux 2?



Tiago Peres
(75 rep)
Oct 6, 2020, 05:47 AM
• Last activity: Oct 15, 2020, 01:54 PM
1
votes
2
answers
1723
views
Why does `pip` throw `ModuleNotFoundError` even though `setuptools` appears to be installed?
On an EC2 instance, I am attempting to install a Python package using `pip`, but receive an exception that states ```ModuleNotFoundError: No module named 'setuptools'```. For context, the command I run is ``` pip install --user mlflow ``` I attempt to resolve the issue my installing `setuptools` wit...
On an EC2 instance, I am attempting to install a Python package using
pip
, but receive an exception that states : No module named 'setuptools'
.
For context, the command I run is
pip install --user mlflow
I attempt to resolve the issue my installing setuptools
with the following command: yum install python36-setuptools
. Yet, the message returned indicates that setuptools
is already installed:
Package python36-setuptools-36.2.7-1.33.amzn1.noarch already installed and latest version
Nothing to do
Please advise.
**UPDATE**: After switching the EC2 instance from Amazon Linux AMI 2018.03.0
to Amazon Linux 2 AMI
I was able to successfully install mlflow
using pip
.
The question still remains - why was I able to successfully install using Amazon Linux 2 AMI
but not Amazon Linux AMI 2018.03.0
?
Jubbles
(145 rep)
Jul 27, 2020, 03:48 AM
• Last activity: Oct 14, 2020, 09:23 PM
0
votes
0
answers
56
views
Slow port scan?
Probably no big deal although I have questions. Background: My home wireless was being overrun with all the devices. Have 6 people on the net and each have multiple devices. Then the kids would have friends over and the device count would go up. I have identified the mac addys for the local devices...
Probably no big deal although I have questions. Background: My home wireless was being overrun with all the devices. Have 6 people on the net and each have multiple devices. Then the kids would have friends over and the device count would go up. I have identified the mac addys for the local devices and modified iptables and dhcp to redirect unknown devices to a specific web page and not allow them on the network.
So for the problem. During my watching of the network I have found that Amazon, Xbox and some Androids ping multiple different ports on my router. Most ports are above 1024, although I have seen some below that. Pings happen about every minute and a half per device. Some ping 10 times, other less. Every once in awhile we get more than 10 pings; all are using different destination ports. Some pings are from the source out in inet land with most being from the local device. Sure, ping uses a tiny amount of bandwidth.
So my question: Anybody have any idea of what are these pings for? Looking at it as a security issue, it sure could be a 'slow' port scan to find holes in my systems. Since these devices are smart devices, just about anything could be done given a flaw in my network if there is one. I have dropped them at the router using the INPUT and FORWARD chains unless somebody gives me a good reason not to.
Maybe I am thinking all wrong about this - ideas?
Thanks
Todh
Welp, made an executive decision. Decided to drop all of the above packets and see who here complained. So far nobody! In other words, I gave up and just dropping stuff was easier.
ctclibby
(29 rep)
Mar 30, 2020, 10:21 AM
• Last activity: Apr 4, 2020, 01:22 PM
11
votes
5
answers
52856
views
Check if file exists in S3 Bucket
This directory `/data/files/` has thousands files like: 1test 2test 3test [...] 60000test 60001test I'm also sending them to a S3 Bucket (AWS), using `AWS CLI`. However, sometimes the S3 bucket can be offline and because of that the file is skipped. How can I check if the file that exists in `/data/...
This directory
/data/files/
has thousands files like:
1test
2test
3test
[...]
60000test
60001test
I'm also sending them to a S3 Bucket (AWS), using AWS CLI
. However, sometimes the S3 bucket can be offline and because of that the file is skipped.
How can I check if the file that exists in /data/files/
is also in the S3 Bucket? and if not copy the missing file to S3?
I would prefer to do this using BASH. Also if I need to change the AWS CLI for another one, can be.
Patrick B.
(219 rep)
Jan 23, 2017, 10:16 PM
• Last activity: Mar 24, 2020, 06:18 AM
2
votes
1
answers
2108
views
How to set email alert for disk space usage for ubuntu instance on AWS?
I have an ubuntu instance on AWS and I want an email when 80% of disk space is consumed. I have checked the cloud watch but there is no such option to monitor disk space. There is only one option which is custom metric https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/mon-scripts.html but I am not...
I have an ubuntu instance on AWS and I want an email when 80% of disk space is consumed. I have checked the cloud watch but there is no such option to monitor disk space. There is only one option which is custom metric https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/mon-scripts.html but I am not sure that it will give an email alert. Please guide me for the same.
Neetesh Gangwar
(23 rep)
Jun 15, 2019, 11:53 AM
• Last activity: Jul 22, 2019, 07:48 AM
0
votes
1
answers
154
views
How to copy CentOS server using SSH from one hosting to AWS EC2?
I have like 15 VPS CentOS machines with SSH access on one hosting and I need to move them all to Amazon Web Services to EC2 That hosting is not supporting anything expect of SSH Which the easiest options do I have to move them to AWS?
I have like 15 VPS CentOS machines with SSH access on one hosting and I need to move them all to Amazon Web Services to EC2
That hosting is not supporting anything expect of SSH
Which the easiest options do I have to move them to AWS?
Artik
(1 rep)
Jul 20, 2019, 05:26 PM
• Last activity: Jul 22, 2019, 12:55 AM
0
votes
1
answers
385
views
how to update amazon linux gmp package?
We have an Amazon Linux server and we scan it using OpenVAS. It detected one high vulnerability which is **Amazon Linux Local Check: alas-2016-754**. Looking at the solution it says **Run yum update php70 to update your system.** The vulnerable package detected is: Vulnerable package: gmp Installed...
We have an Amazon Linux server and we scan it using OpenVAS. It detected one high vulnerability which is **Amazon Linux Local Check: alas-2016-754**.
Looking at the solution it says **Run yum update php70 to update your system.**
The vulnerable package detected is:
Vulnerable package: gmp
Installed version: gmp-6.0.0-11.16.amzn1
Fixed version: gmp-7.0.11-1.16.amzn1
At first we don't have php installed. So what we did is install latest version of php. Upon running the suggested solution the result is "No packages marked for update".
We also did yum update.
After doing another scan the package is still detected by OpenVAS.
The question is how to update this package?
Finn
(1 rep)
Jun 18, 2019, 07:58 AM
• Last activity: Jun 18, 2019, 08:07 AM
1
votes
0
answers
473
views
How to enable ZipArchive PHP class
Recently I have installed a PHP on Amazon Linux to run Chevereto. It's an image hosting service. When I wanted to install it on my EC2 instance, I got the following error: > Aw, Snap! Your web server lacks some requirements that must be fixed to install Chevereto. Please check: **Enable ZipArchive P...
Recently I have installed a PHP on Amazon Linux to run Chevereto. It's an image hosting service.
When I wanted to install it on my EC2 instance, I got the following error:
> Aw, Snap! Your web server lacks some requirements that must be fixed to install Chevereto. Please check:
**Enable ZipArchive PHP class**
Does anyone know how to enable this on Amazon Linux?
Foxy
(11 rep)
May 25, 2019, 10:38 AM
• Last activity: May 25, 2019, 12:41 PM
-1
votes
1
answers
3202
views
Getting "Permission denied" when trying to create a file despite correct permissions
I’m using Amazon Linux and running a script through a Jenkins job, including this line touch /usr/java/jboss/standalone/deployments/myproject.war.dodeploy which results in the error … touch: cannot touch ‘/usr/java/jboss/standalone/deployments/myproject.war.dodeploy’: Permission denied I thought I h...
I’m using Amazon Linux and running a script through a Jenkins job, including this line
touch /usr/java/jboss/standalone/deployments/myproject.war.dodeploy
which results in the error …
touch: cannot touch ‘/usr/java/jboss/standalone/deployments/myproject.war.dodeploy’: Permission denied
I thought I had the perms and groups set properly, so I output those in my script as well. But I can’t see why things are falling apart. Below is the output. What else do I need to do to get my touch command to work?
+ whoami
jboss
+ groups jboss
jboss : jboss evotext
+ ls -al /usr/java/jboss/standalone/deployments/
total 20
drwxrwxr-x 4 deploy evotext 4096 Apr 23 18:18 .
drwxr-xr-x 8 jboss evotext 4096 Jun 24 2013 ..
drwxrwxr-x 11 jboss evotext 4096 Apr 23 18:23 myproject.war
drwxrwxr-x 9 deploy evotext 4096 Apr 22 19:21 jenkins.war
-rwxrwxr-x 1 deploy evotext 11 Apr 22 19:21 jenkins.war.deployed
+ touch /usr/java/jboss/standalone/deployments/myproject.war.dodeploy
touch: cannot touch ‘/usr/java/jboss/standalone/deployments/myproject.war.dodeploy’: Permission denied
Build step 'Execute shell' marked build as failure
Dave
(2808 rep)
Apr 23, 2016, 06:28 PM
• Last activity: Apr 16, 2019, 01:28 PM
4
votes
1
answers
5281
views
Apache can't access file while is has permission
I don't want to allow others read access, so I have added my user and the `apache` user to a group called `apachme` and then set that group to all the files and folders I want `apache` to have access to, including the root of the webpage. I have then given group and owner all permissions. After this...
I don't want to allow others read access, so I have added my user and the
with this I get a 500 error, changing it to
These where just to confirm what user apache was running under and that it had been added to the group.
apache
user to a group called apachme
and then set that group to all the files and folders I want apache
to have access to, including the root of the webpage. I have then given group and owner all permissions. After this apache still can't access the files without setting the read permission to allow all(rwxrwxr--(0774)
).
The folder that contains the index file, it's owned by apache
with the group apachme
and the permissions rwxrwxr-x(0775)

0774
will let it run fine

Craig Mosey
(43 rep)
Feb 14, 2016, 01:34 AM
• Last activity: Dec 29, 2018, 10:02 AM
4
votes
2
answers
19951
views
Check if Apache is Installed in Amazon Linux AMI
How can I check if Apache is installed in my Amazon Linux AMI, which is based on RHEL 6? In Ubuntu, I use: dpkg --get-selections | grep apache But that doesn't work in this case. Note, I need to be able to tell if Apache is installed even if it isn't a service.
How can I check if Apache is installed in my Amazon Linux AMI, which is based on RHEL 6? In Ubuntu, I use:
dpkg --get-selections | grep apache
But that doesn't work in this case. Note, I need to be able to tell if Apache is installed even if it isn't a service.
Rick Helston
(141 rep)
Oct 4, 2015, 05:37 AM
• Last activity: Nov 21, 2018, 09:30 PM
0
votes
2
answers
782
views
Trying to SSH login into aws amazon server and getting "Permission denied (publickey)" error
I did login into amazon server on terminal by ssh -i /path/to/pem_file.pem ec2-user@ec2-host.amazonaws.com. It was working fine but there are too many log files into ec2/ folder so i tried to delete them by using the command (find . -file_name_to_delete_all_series"*" -delete) and suddenly i noticed...
I did login into amazon server on terminal by ssh -i /path/to/pem_file.pem ec2-user@ec2-host.amazonaws.com.
It was working fine but there are too many log files into ec2/ folder so i tried to delete them by using the command (find . -file_name_to_delete_all_series"*" -delete) and suddenly i noticed all files deleted and now i am not able to connect to server by using above ssh login command and getting this error "Permission denied (publickey)".
when i am hitting it with -v then its showing
$ ssh -i /path/pem.pem ec2-user@ec2-host-1.amazonaws.com -v
OpenSSH_6.7p1 Ubuntu-5ubuntu1.4, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to ec2-my_server port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /pem_file.pem type -1
debug1: key_load_public: No such file or directory
debug1: identity file /pem_file.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.7p1 Ubuntu-5ubuntu1.4
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1
debug1: match: OpenSSH_6.6.1 pat OpenSSH_6.6.1* compat 0x04000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr umac-64-etm@openssh.com none
debug1: kex: client->server aes128-ctr umac-64-etm@openssh.com none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA 34:77:b9:f0:87:6b:e8:c7:31:90:92:7c:a3:b5:4b:58
debug1: Host 'ec2-server.amazonaws.com' is known and matches the ECDSA host key.
debug1: Found key in /home/apps/.ssh/known_hosts:1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /pem_file.pem
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
Permission denied (publickey).
i think all files has been deleted by ec2/ folder thats why i am facing this error.
Any help would be appreciated.
Amit Appsquadz
(1 rep)
Jul 21, 2017, 08:31 AM
• Last activity: Jul 21, 2017, 10:16 AM
1
votes
0
answers
189
views
Amazon instance automatically creating and resizing partitions after VM Import
I'm using Packer to create a VM with CentOS 7, and exporting it as a `.ova` file at the final of installation. By default, Packer creates a 40GB Virtual Disk (`.vmdk`). After the installation, if I import the .`ova` file in VirtualBox (just for tests) and list the file system of the created VM, I go...
I'm using Packer to create a VM with CentOS 7, and exporting it as a
.ova
file at the final of installation.
By default, Packer creates a 40GB Virtual Disk (.vmdk
). After the installation, if I import the .ova
file in VirtualBox (just for tests) and list the file system of the created VM, I got this:
[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/cl-root 37G 1.6G 35G 5% /
devtmpfs 1.3G 0 1.3G 0% /dev
tmpfs 1.4G 0 1.4G 0% /dev/shm
tmpfs 1.4G 8.4M 1.3G 1% /run
tmpfs 1.4G 0 1.4G 0% /sys/fs/cgroup
/dev/sda1 1014M 166M 849M 17% /boot
tmpfs 268M 0 268M 0% /run/user/1000
tmpfs 268M 0 268M 0% /run/user/0
If I import the same .ova
file in a Amazon Instance, this time increasing the size of my root storage volume to 100GB, I got this file system:
[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/cl-root 50G 4,0G 46G 9% /
devtmpfs 15G 0 15G 0% /dev
tmpfs 15G 0 15G 0% /dev/shm
tmpfs 15G 18M 15G 1% /run
tmpfs 15G 0 15G 0% /sys/fs/cgroup
/dev/xvda1 1014M 185M 830M 19% /boot
/dev/mapper/cl-home 45G 89M 45G 1% /home
tmpfs 3,0G 0 3,0G 0% /run/user/0
tmpfs 3,0G 0 3,0G 0% /run/user/1000
Note that the /
was increased to 50GB, and now a new /home
was automatically created.
This was driving me crazy, until I find the cause:
All the instalallation was made automatically by Packer, using a kickstart config file wich uses autopart
for partitioning.
In RedHat docs, I found this:
autopart (optional)
Automatically creates partitions: a root (/) partition (1 GB or larger), a swap partition, and an appropriate /boot partition for the architecture. On large enough drives (50 GB and larger), this also creates a /home partition.
So, I decided to manually create the partitions, using this lines in the kickstart file instead of autopart
:
part /boot --fstype ext4 --size=1014
part pv.01 --size=1000 --grow
volgroup cl pv.01
logvol swap --fstype swap --name=swap --vgname=cl --size=2048
logvol / --fstype ext4 --name=root --vgname=cl --size=1 --grow
Importing the .ova
again to Amazon, selecting the same storage size of 100GB for the root volume, I finally got what I wanted:
[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/cl-root 94G 2,3G 87G 3% /
devtmpfs 15G 0 15G 0% /dev
tmpfs 15G 0 15G 0% /dev/shm
tmpfs 15G 8,3M 15G 1% /run
tmpfs 15G 0 15G 0% /sys/fs/cgroup
/dev/xvda1 983M 154M 762M 17% /boot
tmpfs 3,0G 0 3,0G 0% /run/user/1000
So I found **WHAT** is going on, but not **HOW** it happens. The questions are:
- The kickstart file is supposed to be used only in installation time.
How after Amazon VM import the file system get changed using the same
conventions of the kickstart installation?
- Where this info is stored, and how the resizing is being done
automatically in CentOS 7?
Eduardo Baitello
(656 rep)
Mar 17, 2017, 07:18 PM
• Last activity: Mar 27, 2017, 12:42 PM
0
votes
1
answers
4486
views
Roles may not be assumed by root accounts
How do I use the `thufir` profile I created, and not use the AWS `root` account? I'm on page 12 of the _AWS Command Line Interface User Guide_: thufir@doge:~$ thufir@doge:~$ cat .aws/config [default] output = text region = us-west-2 [profile thufir] role_arn = arn:aws:iam::1234567890:user/thufir sou...
How do I use the
thufir
profile I created, and not use the AWS root
account?
I'm on page 12 of the _AWS Command Line Interface User Guide_:
thufir@doge:~$
thufir@doge:~$ cat .aws/config
[default]
output = text
region = us-west-2
[profile thufir]
role_arn = arn:aws:iam::1234567890:user/thufir
source_profile = default
thufir@doge:~$
thufir@doge:~$ aws iam list-users
USERS arn:aws:iam::1234567890:user/thufir 2017-01-02T10:09:01Z / ABCDEFGIJKL thufir
thufir@doge:~$
thufir@doge:~$ aws s3 ls --profile thufir
An error occurred (AccessDenied) when calling the AssumeRole operation: Roles may not be assumed by root accounts.
thufir@doge:~$
thufir@doge:~$ export AWS_DEFAULT_PROFILE=thufir
thufir@doge:~$
thufir@doge:~$ aws s3 ls --profile thufir
An error occurred (AccessDenied) when calling the AssumeRole operation: Roles may not be assumed by root accounts.
thufir@doge:~$
[Page 12 of the _AWS Command Line Interface User Guide_](http://docs.aws.amazon.com/cli/latest/userguide/cli-roles.html#cli-role-prepare) says:
After creating the role, modify the trust relationship to allow the IAM user to assume it. The following example shows a trust relationship that allows a role to be assumed by an IAM user namedIs that done locally in a config file physically on my machine, or through a website, or...? *I think this may relate to roles rather than a **profile** as I have configured.*jonsmith
:{ "Version": "2012-10-17", "Statement": [ { "Sid": "", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::123456789012:user/jonsmith" }, "Action": "sts:AssumeRole" }
Thufir
(1970 rep)
Jan 3, 2017, 08:11 AM
• Last activity: Jan 3, 2017, 03:10 PM
0
votes
1
answers
534
views
How to create Lubuntu AMI image on Amazon?
WOndering to create a Lubuntu (not Ubuntu) AMI image on amazon ? Most of the AMI areon Ubuntu, so am not how to get installed Lubuntu from scratch ? http://lubuntu.net/ Thanks
WOndering to create a Lubuntu (not Ubuntu) AMI image on amazon ?
Most of the AMI areon Ubuntu, so am not how to get installed Lubuntu from scratch ?
http://lubuntu.net/
Thanks
tensor
(111 rep)
Dec 1, 2016, 01:00 AM
• Last activity: Dec 8, 2016, 04:02 AM
Showing page 1 of 20 total questions