Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I was studying the Advanced Bash-Scripting Guide from the Linux Documentation Project at work yesterday in my free time. I was excited to get home so I could try out some of the exercises.
I've been using nano as a text editor up until yesterday, when I decided to try out vim. Admittedly I didn't do enough research into vim before launching it thinking it's only a text-editor - How complicated can it be.
Certainly not complicated if you do a little reading before hand, but the command mode, insert mode, etc wasn't naturally intuitive and I found myself not understanding how to exit even just the vim menu. I started inputting random keystrokes to try and exit, and then did some reading up on vim.
In the end, I was able to create my scriptfile and run it - and it ran exactly as expected.
Afterwards I wanted to try and debug a problem that I am having with the Alsa Sound Drivers. The problem is that sound works for certain media (Youtube & some others), but it won't work on other media, namely videos from CNN & other sites.
I decided to reinstall Alsa, so I removed the package, and reinstalled it. Immediately following this I rebooted my system, and now my GUI isn't loading. After entering the encryption key for my drive, the system boots directly to the console.
Is there any hope of debugging this problem or should I reinstall Fedora?
Is it possible I could have messed something up when I was trying to exit vim?
It couldn't possibly have to do with Alsa, could it?
Alsa is associated with the sound on your system but it's also a part of the Linux Kernel so the boot configuration may have become misconfigured or corrupt when you removed alsa.
When a gui doesn't run properly it's usually because the run level has changed, the boot file got messed like mentioned above or the kernel configuration file became corrupted. If that's the case I'm not good with that. Sorry.
It sounds like your in single user mode.
If your not able to change the run level in Fedora or repair the boot than yeah you'll have to do a fresh install of Fedora. (Replace the N with the run-level number.) http://www.tldp.org/LDP/sag/html/run-levels-intro.html
Look at your Fedora boot partition is it flagged with a star like mine?
Code:
/dev/sda1 2048 4196351 4194304 2G 82 Linux swap
/dev/sda2 * 4196352 976773167 972576816 463.8G 83 Linux
Quote:
In the end, I was able to create my scriptfile and run it - and it ran exactly as expected.
So you're using Fedora. Did you bother checking what's the default runlevel? systemctl is your friend there. Did you check if X video or input driver got accidentally hosed by your previous action? Did you check the process list if any display manager or X is listed there? How about the log file, did you have a look at it?
Default run levels - Update(I am now well-read on runlevels)
How to verify the integrity of X Video & input drivers
How to check the process list & log files from the console
Now I know what to research, though can you point me in the right direction to learn about checking the drivers?
Quote:
What was that script for?
It was the simplest of scripts - I was doing the below exercise.
Quote:
Write a script that upon invocation shows the time and date, lists all logged-in users, and gives the system uptime. The script then saves this information to a logfile.
Start reading more about your package manager. I think it is called dnf. You don't verify the integrity of X video or input drivers. You ask the package manager if it installed or not. For your additional reading, check ps manpage.
Quote:
Write a script that upon invocation shows the time and date, lists all logged-in users, and gives the system uptime. The script then saves this information to a logfile.
Sounds like a homework to me. What have you done so far?
Sounds like a homework to me. What have you done so far?
- I'm a business professional and programming enthusiast/hobbyist
- I am teaching myself Bash-Scripting for fun via the Linux Documentation Project's Guides
- I wrote the script already and it worked!
After verifying the script worked by checking the created logfile - I began to debug my sound issues and upon reboot, voila! - my feeling of accomplishment disappeared, though I see it as a learning opportunity. I now know the system is likely unable to boot into runlevel 5 due to something that went wrong when I removed Alsa packages, so it's probably defaulting to runlevel 3.
I suppose I could try
Code:
Telinit 5
- though I'm not expecting the problem to be resolved so easily lol.
Since the inception of systemd, traditional "runlevels" shifted away from so-called runlevels 2-3-4-5. In systemd it is now called 'targets' which is akin to traditional ones in some sense. And the most commonly-used 'targets' are multi-user and graphical.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.