I'm trying to build my own livecd using the debian live project: [URL]. At the end (/usr/lib/finish-install.d) I want the installler to change some configuration files. The custom user selected during the installation I want to put into a variable:
Code:
#!/bin/sh
User=$(getent passwd 1000 | sed -e 's/:.*//')
if [ "$User" != "user" ] ; then
in-target sed -i "s/home/user/home/$User/g" /etc/smb.conf
in-target sed -i "s/USER=user/USER=$User/g" /etc/default/sabnzbdplus
fi
The script seems to work fine because when I have a look at the configuration files the lines have been modified. However the $User was empty. Anyone of you have some knowledge about debian-live and know how to retrieve the custom user that was entered during the installation?
I'm trying to write a small script that will run as root, but launch a command with sudo as another user. I want that user to be whichever user is active user. That is, the user that is using GDM right now, or the one that is logged into the current console. (by current console, I don't mean the user running the script, but rather the user logged into the console currently displayed on the screen.)How can this be done?
I have a script in which it searches the password file for a username based on the user's input. Is there a way I can take the bad input and keep it in a variable. (one that keeps adding all the non-existent users)so how would I get non-existent users into another variable?
I'm trying to setup a custom attribute for user accounts, I'm able to make the attribute (foo) and the Object class (foo_class) . But i'm unable to add foo or foo_class to my test users
I'm sure you all seen how you can use curl to post to you twitter acct. What I'm wondering is how to add a variable to take user input and post that imput.
I heard (although I can't find any sources for proof) that the USER environment variable may not be set in a old Unix shells (maybe even some obscure shells as well). What is the probability that it won't be set?
First time posting here, sort of long time slacker with some gaps in between... Anyway, I have a sort of question/feature request. First of all, I fully understand the KISS philosophy from Slackware. Story: I co-worker of my was looking for a Linux distro to install into a VM that he would be able to carry around in an USB memory from work to home. I suggested for him to try slackware. However, he has a limitation of ~2gb to the installation size, and he doesn't need most of the packages. With this in mind, I helped him select the more relevants one, but it was a pain to make an installation that both works AND attends the 2gb maximum limitation.
From that experience, and also having in mind the KISS philosophy from Slackware, comes my question/sugestion: why not provide an install option like "Custom Packages Script", that will load a single script file from a USB/mounted partition and install pre-selected packages that a person has selected and build the script from? This would allow anyone to build a custom Slackware installation and share it with the community.
I set up some scripts n crontab and I found that the scripts are failing because cron seems not to load my user PATH variable. Is there any way to tell cron to load my PATH variable?
I'm trying to call a specific variable based on a user selection. For example:
Code: Select a file:
[1] foo.tar [2] bar.tar
Enter a selection: I have already coded each possible selection to have its own variable. If the user selects 2 I need to select $SELECTED_TAR2, or if they select 1 I need to select $SELECTED_TAR1 and then do something like this behind the scenes:
I am afraid to ask with so many things changing around in each new release.Where would one add a custom script to execute when logging and shutting down in into a user profile like /home/test or /root ?would this be rc.local?
Just spent three whole days barking up the wrong tree, solving Fedora 11 and Fedora 12 boot failures because the correct hypothesis was illogical: installation did not update/modify the initrd.
The first couple of times I installed Fedora 11 on the HighPoint Technologies RocketRaid 2640x4, the installation inserted my "custom" driver module (rr26xx) into the initrd, permanently, so that the system booted off the controller card for which the custom driver was inserted. (I yelled about this success in this thread: [url]
My most recent installs of BOTH F11 and F12 on the RocketRaid failed to properly set up the boot. It turns out that the "rr2640" module I "slipstreamed" into the installation process was *NOT* permanently added to the initrd by anaconda. (F12 gave me "no root device found boot has failed, sleeping forever", on boot; F11 hung also, without such error, I presume, during the init script execution). Because of limited resources and time, I only know for sure the module was missing from the F11 initrd, and am ASSUMING the same was the case with F12.
The only difference between the successful installs and the ones with failed boot is that the successful installs were made on a single-drive (JBOD) mode on the controller; whereas, the failed ones were placed on RAID 5. But, AFAIK, the created logical device for the card is "/dev/sda", in both cases, and the kernel can not distinguish between the two cases (or can it?). Thus, the inconsistency cost me a lot of time, and is still inexplicable to me.
Question: What is the best way to deal with custom drivers, today? There are custom spins, and many tools, like isomaster. Stupid question: Is there a way to modify the initrd inside an installer ISO -- be it for CD/DVD/USBboot drive -- beefing the init RAM disk with whatever modules you'd like, for the boot process (using, say, isomaster)?
And what makes anaconda understand that a module must be added to the initrd ? How can one force anaconda to do so?
How does moving to dracut as the initrd tool affect any/all of the above?
I'm trying to read content of file to variable and use this variable in for loop. The problem is, when I have c++ comment style in file - /*. Spaces in line are also interpreted as separated lines.
For example:
Code:
Changing $files to "$files" eliminate these problems but causes that whole content of variable is treated as one string (one execution of loop).
my script has a variable which comes in the form +00.00 +0.00 -00.00 or -0.00 (the numbers can be any in that form) for any that have a + symbol I need to remove the +, but if it has a - symbol it needs to stay.
i need to make a new variable with the string from the old variable btut without any plus sign. I have tried a lot of different ways with no success, each thing I tried either left the + or removed the entire string. I think this should work but doesn't
I followed The Perfect Server - Debian Lenny on howtoforge website. (Just changed some instructions to fit Sqeeze) * I did not install Control Panel, just software like LAMPP & Mail Servers - SMTP(SSL+AUTH) + POP(SSL) + IMAP(SSL).When I installed PHP it installed it with Suhosin Patch, but that patch was giving me a headache with some web scripts that I write for myself. So I decided to compile it for myself. Here is how I done it:
I am supposed to create an environment variable with the PRINTER variable, which should resolve to the word sales. Would the command be like this?: env PRINTER - NAME=SALES (is this the command to create that variable with resolving the word sales to it?)
I'm trying to add 2 new environment variables (Debian . I have created a "/etc/profile.d/java.sh" file and in it I have added these lines (and just for the record, I've also tried adding those line to the profile file with the same results as explained below).
The first variable "XAPPLRESDIR" is added just fine (I check by doing echo $XAPPLRESDIR). The second variable is not added. Here's what I discovered though, if I change the variable name to LD_LIBRARY_PATK (I change the word "path" into something else) then it works just fine... So how am I supposed to add this variable? I need it to be named just that...
I'm working on a custom Debian "spin" (one customized for personal/work use). I did this once before with an Ubuntu build, but attempting it with Debian has loaded me with a steady flow of walls (everyone loves debugging!). Despite a variety of approaches, none of my images seem to boot. I've tried the following with both SysV and systemd. the search results I find are vague, at best. I'll attempt to categorize and explain this as intelligently as possible.
A variety of ISOs were tried in Virtualbox, so these are the errors they're yielding; I'm currently down on removable media since I loaned my flash disks to a couple students for their finals, so I can't boot that way until Tuesday. I really hope that the error is something that can be identified regardless of whether or not I'm using a virtual environment.
Method 1: This Guide This appealed to me the most at first because I run a stripped-the-hell-down version of Ubuntu on my work laptop. (Wheezy/Haswell yielded unfavorable results, and at the time Jessie's SysV compatibility was undesirable, but I'll probably switch back by the end of the week if possible.) I have a feeling that this guide may simply be obsolete, or maybe I'm just neglecting a crucial step. Here's the output: a lovely kernel panic.
Method 2: refractasnapshot With it properly configured (and with syslinux-utils installed -- head-on-a-stick and fsmithred), I tried two different approaches: the first, I ran it within the chroot environment mentioned above; the second, I created a Virtualbox build and ran it within that. Both yielded the same errors:
For each, I received two complains: about piix_smbus and no valid rapl domains, and the system hangs indefinitely (ie, all night). Following some search results, I blacklisted i2c_piix4 and paevm, then rebuilt the image, and mounted it in VirtualBox. At boot:
Code: Select allEDD: Error 0c00 reading sector 276375 No DEFAULT or UI configuration directive found! boot: _
I been trying all day to compile a kernel i downloaded from http://www.kernel.org/ (2.6.32.8 )Following this help thread viewtopic.php?t=4468.When i invoke make xconfig i'm just kinda lost at that point. Not really sure what to do, so i just save it as is and then compile/install.when i try to boot the kernel, a kernel panic happens saying it can't not mount the root partition.So i am sure i am missing a step with the xconfig part but not sure what.
for a project I am working on, I need the same install configuration on every machine, and I'd like to have all the packages I need on one disc, with none of the ones I don't. I also need to use a non-standard file systems(jffs2,nilfs) as the hardware end of my project works on flash memory, and would like these two FSs to replace the typical magnetic disk based choices.
I've written my custom keyboard layout, where I'm trying to remap the Menu key as Super. The key gets remapped, however Super is not recognized as a modifier key, unlike with a standard layout I've used as a comparison. What puzzles me is that the left Windows key, which I never refer to in my custom layout stops working as well.
Here is the relevant section of my custom layout:
Output of xev command shows the key has been remapped correctly:
After my NVIDIA card died I decided it was time to buy an AMD card again (R9 270X), but I didn't think AMD drivers were such a pain in Linux as people said. Of course, in some distros anyway. On Arch, for example, there's no official release because Arch's developers would have to hold Xorg in order to make a closed-source driver available, because AMD's pace isn't in pair with Linux. So in order to install AMD's drivers on Arch I must rely on some guy's unnoficial repositories, but that isn't the whole problem. Even though I'm cool with adding repos and downgrading Xorg, I'm not cool with it not working for a lot of apps, so that's where I decided to try a few distros. Manjaro is a no-go because it installs Flash as default. openSUSE although is a very good distro, is a complete mess when it comes to repositories, specially multimedia ones. Ubuntu/Mint are also a no-go, Ubuntu because after 12.04 they have a spyware by default, and Mint because it contains non-free stuff by default.
So here I come! I ran Debian in the past for a long time (aside from a breaf period last year) and it was lovely, I could easily set up a custom encrypted install, but now I don't remember how to, and it's killing me. I don't like how the installer doesn't show the partitions size as they actually are, and I don't like how the automated encrypted LVM setup doesn't let me chose the encryption algorithm or the timeframe between each passphrase attempt. That's why I must create my install, and here's what I used to do on Arch (the part that really matters), converted to what I use on Debian:
Code: Select all# modprobe dm-mod
(create one 1GB partition for /boot, unencrypted ; create another big 930 GB formatted as "8e" - LVM - on dev/sda2) Code: Select all# fdisk /dev/sda (chose my ciphers and iter time) Code: Select all# cryptsetup -c twofish-xts-plain64 -y-s 512 --iter-time 5000 luksFormat /dev/sda2 (open the luks container on "sda2_crypt")
[Code].....
After this is done, I go to the "partition disks" page where I select each partition/volume to it's correct destination. I then proceed to installing the base system, configuring apt, and all that. Now, before I install Grub I used to execute the following commands on shell:
Code: Select all # nano /etc/crypttab
I used to put something there, but I don't remember what exactly. It's been a long time since I used Debian for long! But here's what I put there:
On macbook air 6.2, i've installed a Debian jessie mate DE, dual boot using refind. I'm currently fine-tuning it. I've made a script following powertop advice:
I'd like to create my own custom Debian live CD — the idea being to have my own rescue CD with my favorite Debian tools installed. I read about bootcd and was going to give that a try, after creating the ideal system in a qemu virtual machine.
How much exactly can you install on a system so that bootcd can still fit it on a CD? I'm presuming there is some kind of compression involved. When I tried to create my VM, I coudln't get Jessie + LXDE to install onto a 2GB virtual drive (net install) so naturally I'm wondering what I'm going to be able to put on a 700MB CD.
I just installed Debian 8 (loving it so far) and everything its working right except for one thing: The monitor resolution!
I've got a LG 22 inch monitor and it supports up to 1360x768 but the display settings only shows 1024x768 as max resolution. Doing a little research i was able to get the desire resolution (1360x768) through the use of the tool "xrandr". The problem is that the resolution its not permanent and i need to invoke the xrandr script (i wrote a very basic "script" to set the resolution) on every restart or session logout and of course this is annoying. I've tried to use "crontab" to invoke the script on every restart but for some reason did not worked.
So, making more research i saw that apparently the correct way to set the resolution is by making use of "xorg.conf" but didn't quite get how to do....
I'd like to create a custom squeeze kernel. Is it a really bad idea to edit to edit the kernel config file directly instead of using "make config", "make menuconfig" or "make gconfig"? My problem is I missing a search function, for example in "make menuconfig" and cannot find some entries.