The small linux problem thread

A simple way to look at it:

dd doesn’t know what files are, it just knows what sectors are.

With that in your mind you can also surmise that dd doesn’t know how big files are or how they are named or anything else. It just copies each sector, it doesn’t know or care about its contents. So when you copy a drive with dd it will copy everything, including empty sectors.

While copying this looks like it is “filling” the drive, but it is “filling” it with empty space that you can write to after it’s done.

1 Like

Cloned usb worked but for the fact that I am only be able to access grub through the recovery options on a live cd, otherwise the computer goes straight to bios without the live usb in

I tried repairing grub with super grub disk but it didn’t help.

I’m afraid my troubleshooting skills here may be limited, but I’m guessing you shrunk the partition to be copied and then issued the copy command outlined in the guide (with your own modifications), right?

First, is booting allowed from the emmcblk0 memory card?

What device is this in?

Can you post the output of fdisk -l /dev/sde with your original thumb drive inserted?

Can you post the exact dd command you used to clone the thumb drive?

Hi @TheCakeIsNaOH, I setup LAMP of Fedora 31 and installed Nextlcoud. I think if figured a lot of things out but now having some SELinux issues with ONLYOFFICE. I am pretty sure that this is SELinux and not DAC because everything works when I disable SELinux. But, with SELinux enabled, I am able to create and but not edit ONLYOFFICE documents. Further, I keep getting 2 SELinux AVC denials to x2t and ldd. It looks like they are being prevented from running. I am going through the Redhat documentation (https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/security-enhanced_linux/chap-security-enhanced_linux-targeted_policy) and see there is a diference between files/directories and things that execute. Presumably, I should be able to [conde]semanage fcontext -m[/code] or semanage fcontext -a -t but I can’t. I am not sure how small of an issue this is so I figured that I try to keep it short (i.e., no error logs etc . . . ) and ask here first. Would it be better if I create a separate thread for this sort of thing?

This probably a fine place, although you can always make a new thread if you want.

I do not really have experience with fixing SELinux, so I can’t really help you.

If i dd a 1-gb bootable.img to a 32-gb drive, will it take the full drive or just a 1-gb chunk?

It takes up the 1GB chunk.

Lots of images that are designed to be DD’d will run a script on first boot to resize themselves to fill the unpartitioned space.

1 Like

Hi all,

I recently tried Manjaro Xfce and really like the theme, especially the color scheme. Does anyone know how I can get the same them of my Fedora Xfce? I am running Fedora 31.

PSA: You do not need the “non-free” repos to install ffmpeg on Fedora. The “free” repos work just fine…

Not sure why every tutorial and the tutorial author’s mother claims “non-free” is required, but it is not. Just verified with a friend and on my Fedora server.

End PSA…

CC @SgtAwesomesauce @nx2l

2 Likes

Well shit. I fucked up my script again and can’t figure out what the hell the problem is. If I use the apache server to read Kickstart the install times out.

[   17.617898] IPv6: ADDRCONF(NETDEV_UP): ens2: link is not ready
[   17.620066] 8021q: adding VLAN 0 to HW filter on device ens2
[   19.616850] e1000: ens2 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
[   19.620898] IPv6: ADDRCONF(NETDEV_CHANGE): ens2: link becomes ready
[   80.907524] dracut-initqueue[981]: RTNETLINK answers: File exists

At this point.

If I pass the file directly it works. I tried using a Fedora ISO and when I went back to CentOS started having this issue. It has worked before.

Installer commands:

sudo virt-install --name $vm \
                  --ram $ram \
                  --disk path=./$hd,size=$hd_size \
                  --vcpus $num_cpu \
                  --os-type linux --os-variant generic \
                  --network bridge=br0 \
                  --graphics none --console pty,target_type=serial \
                  --location '/home/chris/ISOs/centos8.iso' \
                  --extra-args "console=ttyS0,115200n8 serial" -x 'ks=http://172.16.0.100/ks.cfg'

If I click the link it opens the ks file. Nothing has changed except for this script. I thought all I did was change the ISO but apparently I did more than that. Fuck this is always so annoying.

This DOES work, I just confirmed again.

sudo virt-install --name $vm \
                  --ram $ram \
                  --disk path=./$hd,size=$hd_size \
                  --vcpus $num_cpu \
                  --os-type linux --os-variant generic \
                  --network bridge=br0 \
                  --graphics none --console pty,target_type=serial \
                  --location '/home/chris/ISOs/centos8.iso' \
                  --initrd-inject /var/www/html/pub/ks.cfg \
                  --extra-args "console=ttyS0,115200n8 serial" -x 'ks=file:/ks.cfg'

Hm… Why is the ks=http:// not being accepted?! Record your voice and send it my way because I’m clawing my eyes out over this lol

V7 needs inst.ks=

V6 used ks=

1 Like

Hm… Any other weird quirks you see that might be affecting this? That did not seem to make a difference.

--extra-args "console=ttyS0,115200n8 serial inst.ks=http://172.16.0.100/ks.cfg"

I mean… yeah :thinking:

[tarulia@localhost ~]$ dnf info --showduplicates ffmpeg | grep Repository
Repository   : @System
Repository   : rpmfusion-free
Repository   : rpmfusion-free-updates

Not sure what tutorials you’re referring to exactly, but from what I remember when I did it a year ago it just told me to enable rpmfusion repos in general, and didn’t specify if free or nonfree.
Also wouldn’t make sense because AFAIK nonfree is only for proprietary software. But ffmpeg is not proprietary, just the codecs are patented, which makes it not able to be in the main repos.

Case in point:

[tarulia@localhost ~]$ dnf info --showduplicates discord | grep Repository
Repository   : @System
Repository   : rpmfusion-nonfree-updates
Repository   : rpmfusion-nonfree
1 Like

-x and --extra-args are the same option

but the man page says what you have should be working

also

the ability of the vm to wget/curl that file on a web server could be limited if networking doesnt work on boot from the iso file

1 Like

I said the same thing, and my friend said “Look it up, everything I’ve read said to do it”

Lol.

Hm… It’s just so weird because last week this exact config worked.

I’ll keep messing with it. Lesson learned, git stash save all the fucking things lol

Yeah that’s what I mean, they don’t explicitly say you need nonfree, they just take the line from the rpmfusion documentation and go with it. At one point or another you’ll most likely need nonfree anyway, and just having it enabled doesn’t really hurt anything either.

1 Like

I agree. Said friend is attempting to be one of those, uh, purists I guess. I told him I hope he plans on writing his own firmware and CPU lol.

Anyway, appreciate the sanity check. He asked me if “nonfree” was needed and I said no and he showed me all those links. So I tried it with “free” only and it worked.

1 Like

@nx2l It’s something with the server :confused: I tried using another KVM host and it still fails, same part.

Anyone familiar with Nginx redirection?

I am trying to redirect /#/register to /register

rewrite ^/#/register$ /register; put in the server block is not working.

server config
server {

        root /var/www/riot;

        server_name riot.domain.name;

        rewrite ^/#/register$  /register;

        location ~ ^/(static|register) {
                proxy_pass http://localhost:8081;
        }

        location / {
                proxy_pass http://localhost:8080/;
        }

        listen [::]:443 ssl; # managed by Certbot
        listen 443 ssl; # managed by Certbot
        #other SSL stuff redacted here

}
server {
    if ($host = riot.domain.name) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


        listen 80;
        listen [::]:80;

        server_name riot.domain.name;
        return 404; # managed by Certbot

}