본문 바로가기
컴퓨터 활용(한글, 오피스 등)/50_2.운영체제_리눅스

리눅스_우분투_설치 후 부팅 에러

by 3604 2022. 10. 25.
728x90

우분투 20.04 설치 후 부팅 에러 (PCIe Bus Error severity=Corrected)

 

$cp /etc/default/grub ~/grub.back

$sudo gedit /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash pci=noacer”

$sudo update-grub

리눅스 재기동

 

$truncate -s 0 syslog
$truncate -s 0 kern.log

$sudo apt update

$sudo atp upgrade

 

우분투 16.04 설치 후 부팅 에러 (PCIe Bus Error severity=Corrected)

Saehun Kim guitar 2019. 9. 2. 14:32
 

1줄 요약: 'Ctrl-c'

 

우분투 설치 후 재시작하라는 문구가 나오고 재시작을 누르면

이렇게 pcieport PCIe Bus Error 가 연속적으로 나오면서 부팅이 안되더라. Restart now를 눌렀을 때만 저 에러가 뜨고 껐다 키면 아예 검은 화면만 뜨는 상황..

 

구글에 쳐보면 booting kernel parameter를 어떻게 하라는 둥, grub terminal으로 어떻게 하라는 둥, 일주일 동안 별의 별짓을 다 해봤지만 다 실패했다. 그렇게 포기하려 할때..

 

저렇게 에러가 쭉쭉쭉 계속 나오는 상황에서 'Ctrl-c' 를 눌렀더니

 

정상 부팅 됐다..

 

이유를 생각 해보면, 우분투는 정상적으로 설치가 된 것이다. 하지만 재시작할때 우분투 부팅 디바이스가 우분투를 제대로 불러오지 못하고 다른 곳을 파고 있는 것이다. 껐다 키면 아예 우분투 부팅 디바이스를 찾지를 못해서 아무것도 안뜨고. 그래서 Ctrl-c 로 그거 아니야 라고 해주면 잘 되는건가.

 

일주일의 시간을 한줄과 맞바꿨다.

 

참고자료

Troubleshooting PCIe Bus Error severity Corrected on Ubuntu and Linux Mint

ByCommunityUpdated onDecember 21, 2019

25 Comments

Reading Time: 5 minutes

Recently I was trying to install Mint on several nodes in my institute. At times, I was not able to install and got lots of ‘PCIe Bus’ errors on the screen. I have also observed similar issue with Ubuntu 18.04.

I got stuck into it for more than a month, after using many solution and observations (solution is the same, but observation and treatment may be different), I found something which was helpful for me and I think could be helpful for other Ubuntu and Linux Mint users.

Observations about PCIe Bus Error severity Corrected

It happened with my HP system and it seems that there is some compatibility issues with the HP hardware. The PCIe Bus Error is basically the Linux kernel reporting the hardware issue.

This error reporting turns into nightmare because of the frequency of error messages generated by the system. I have noticed in various Linux forums that many HP user have encountered this error, probably HP needs to improve Linux support for their hardware.

Do note that this doesn’t necessarily mean that you cannot use Linux on your HP system. You might be able to use Linux like everyone else. It’s just that seeing this message flashing on the screen on every boot is annoying and sometimes, it could lead to bigger troubles.

If the system keeps on reporting, it will increase the log size. If you have limited space for root, it could mean that your system will stuck at the black screen displaying the PCIe error message and your system won’t be able to boot.

Now that you know a few things, let’s see how to tackle this error.

Handling PCIe Bus Error messages if you can boot in to your Linux system

If you see the PCIe Bus Error message on the screen while booting but you are still able to log in, you could do a workaround for this annoyance.

You can do little on the hardware compatibility front. I mean you (most probably) cannot go ahead and start coding drivers for your hardware or fix the existing drivers code. If your system works fine, your main concern should be that too much of error reporting doesn’t eat up the disk space.

In that regard, you can change the Linux kernel parameter and ask it to stop reporting the PCIe errors. To do that, you need to edit the grub configuration.

Basically, you just have to use a text editor for editing the file.

First thing first, make a backup of your grub config file so that you can revert in case if you are not sure of things you changed. Open a terminal and use the following command:

cp /etc/default/grub ~/grub.back

Now open the file with Gedit for editing:

sudo gedit /etc/default/grub

Look for the line that has GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”

Add pci=noaer in this line. AER stands for Advanced Error Reporting and ‘noaer’ asks the kernel to not use/log Advanced Error Reporting. The changed line should look like this:

 GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=noaer"

Once you have saved the file, you should update the grub using this command:

sudo update-grub

Restart Ubuntu and you shouldn’t see the ‘PCIe Bus Error severity Corrected messages’ anymore.

If this doesn’t fix the issue for you, you can try to change other kernel parameters.

Further troubleshooting: Disable MSI

Now you are resorting to hit and trial. You may try disabling MSI. Though Linux kernel supports MSI for several years now, a wrong implementation of MSI from some hardware manufacturer may lead to the PCIe errors.

The drill is practically the same as you saw in the previous section. You edit the grub configuration and make the GRUB_CMDLINE_LINUX_DEFAULT line look like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=nomsi"

Update grub and reboot the system:

sudo update-grub

Even further troubleshooting: Disable mmconf

I know it’s getting repetitive but if you are still facing the issue, it could be worth to give this a last try. This time, disable the mmconf parameter in Linux kernel.

mmconf means memory mapped config and if you have an old computer, a buggy BIOS may lead to this issue.

The steps remain the same. Just change the line GRUB_CMDLINE_LINUX_DEFAULT in your grub config to make it look like:

 GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=nommconf"

Can’t boot! How to edit grub config now?

In some cases, if you are not even able to boot at all, perhaps your root is out of space. An idea here would be to delete old log files and see if you could boot now and if yes, change the grub config.

On reboot, if you stuck with logs on the screen and do a hard boot (use power button to turn it off and on again). When you power on, choose to go in to recovery mode from the grub screen. It

should be under Advanced options.

If your system doesn’t show the grub screen, press and hold shift key at boot. In some systems, pressing the Esc key brings the grub screen.

In the advanced option->recovery mode:


Drop into root shell:

If you use the ls command to find large files, you’ll see that sys.log and kern.log take huge space:

ls -s -S /var/log

You can empty the log files in Linux command line this way:

$ > syslog
$ > kern.log

Once that is done, reboot your system. You should be able to log in. You should quickly change the grub parameters as discussed above. Adding pci=noaer should help you in this case.

I know it’s more of a workaround than solution. But this is something that troubled me long and helped me get around the error. Otherwise I had to reinstall the system.

I just wanted to share what worked for me with the community here. I hope it helps you as well.

This article is written by Arun Shrimali. Arun is IT Head at Resonance Institute in India and he tries to implement Open Source Software across his organization.

The article has been edited by Abhishek Prakash.

 

 

How to Empty a Log File in Linux

Abhishek Prakash

Table of Contents

  1. 4 ways to empty a file in Linux

 

You’ll find yourself in situations where you need to empty a file. This often happens when you have huge log files and How would you do that?

One not so clean way would be to remove the file and then create a new file. But this is not a good idea. It won’t be the same file, the timestamp (atime, mtime etc) will be different along with other file permissions.

Instead of creating a new empty file, you can delete its content. So, how do you empty a file in Linux? How to clear a file from all of its content without deleting the actual file?

4 ways to empty a file in Linux

There are several ways you can empty a file without actually deleting the file. Let me show you some of these methods.

Method 1: Truncate a file using truncate command

The safest way to truncate a log file is using the truncate command.

truncate -s 0 filename

In the above command, -s is used to set/adjust the size (in bytes) of the file. When you use -s 0, it means you adjusted the file size to 0 bytes. In

Method 2: Empty file using :> or >

The simplest way to empty a file is to use the command below. If the file is not in use, it will work in Bash:

> filename

While the above works only in Bash Shell, you can use a similar command for other shells:

:> filename

You can also use this command to clear a file:

true > filename

Method 3: Using echo command to empty file in Linux

Another way to empty a file is via echo command in Linux:

echo > filename

You can also use echo command in this way:

echo "" > filename

Method 4: Use /dev/null to clear a file

You can also use the famous /dev/null and combine with the cat command to clear a log file:

cat /dev/null > file.log

In the end…

And if you don’t have enough permissions for any of the above commands, this is the sure shot but a little dirty way to achieve it:

touch newfile
mv newfile filename

You can also empty a file by deleting all lines in Vim editor.

If your aim was to clear log files and make some free space, you should learn about cleaning journald logs.

 

Troubleshooting PCIe Bus Error severity Corrected on Ubuntu and Linux Mint

ByCommunityUpdated onDecember 21, 2019

25 Comments

Reading Time: 5 minutes

Recently I was trying to install Mint on several nodes in my institute. At times, I was not able to install and got lots of ‘PCIe Bus’ errors on the screen. I have also observed similar issue with Ubuntu 18.04.

I got stuck into it for more than a month, after using many solution and observations (solution is the same, but observation and treatment may be different), I found something which was helpful for me and I think could be helpful for other Ubuntu and Linux Mint users.

Observations about PCIe Bus Error severity Corrected

It happened with my HP system and it seems that there is some compatibility issues with the HP hardware. The PCIe Bus Error is basically the Linux kernel reporting the hardware issue.

This error reporting turns into nightmare because of the frequency of error messages generated by the system. I have noticed in various Linux forums that many HP user have encountered this error, probably HP needs to improve Linux support for their hardware.

Do note that this doesn’t necessarily mean that you cannot use Linux on your HP system. You might be able to use Linux like everyone else. It’s just that seeing this message flashing on the screen on every boot is annoying and sometimes, it could lead to bigger troubles.

If the system keeps on reporting, it will increase the log size. If you have limited space for root, it could mean that your system will stuck at the black screen displaying the PCIe error message and your system won’t be able to boot.

Now that you know a few things, let’s see how to tackle this error.

Handling PCIe Bus Error messages if you can boot in to your Linux system

If you see the PCIe Bus Error message on the screen while booting but you are still able to log in, you could do a workaround for this annoyance.

You can do little on the hardware compatibility front. I mean you (most probably) cannot go ahead and start coding drivers for your hardware or fix the existing drivers code. If your system works fine, your main concern should be that too much of error reporting doesn’t eat up the disk space.

In that regard, you can change the Linux kernel parameter and ask it to stop reporting the PCIe errors. To do that, you need to edit the grub configuration.

Basically, you just have to use a text editor for editing the file.

First thing first, make a backup of your grub config file so that you can revert in case if you are not sure of things you changed. Open a terminal and use the following command:

cp /etc/default/grub ~/grub.back

Now open the file with Gedit for editing:

sudo gedit /etc/default/grub

Look for the line that has GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”

Add pci=noaer in this line. AER stands for Advanced Error Reporting and ‘noaer’ asks the kernel to not use/log Advanced Error Reporting. The changed line should look like this:

 GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=noaer"

Once you have saved the file, you should update the grub using this command:

sudo update-grub

Restart Ubuntu and you shouldn’t see the ‘PCIe Bus Error severity Corrected messages’ anymore.

If this doesn’t fix the issue for you, you can try to change other kernel parameters.

Further troubleshooting: Disable MSI

Now you are resorting to hit and trial. You may try disabling MSI. Though Linux kernel supports MSI for several years now, a wrong implementation of MSI from some hardware manufacturer may lead to the PCIe errors.

The drill is practically the same as you saw in the previous section. You edit the grub configuration and make the GRUB_CMDLINE_LINUX_DEFAULT line look like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=nomsi"

Update grub and reboot the system:

sudo update-grub

Even further troubleshooting: Disable mmconf

I know it’s getting repetitive but if you are still facing the issue, it could be worth to give this a last try. This time, disable the mmconf parameter in Linux kernel.

mmconf means memory mapped config and if you have an old computer, a buggy BIOS may lead to this issue.

The steps remain the same. Just change the line GRUB_CMDLINE_LINUX_DEFAULT in your grub config to make it look like:

 GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=nommconf"

Can’t boot! How to edit grub config now?

In some cases, if you are not even able to boot at all, perhaps your root is out of space. An idea here would be to delete old log files and see if you could boot now and if yes, change the grub config.

On reboot, if you stuck with logs on the screen and do a hard boot (use power button to turn it off and on again). When you power on, choose to go in to recovery mode from the grub screen. It

should be under Advanced options.

If your system doesn’t show the grub screen, press and hold shift key at boot. In some systems, pressing the Esc key brings the grub screen.

In the advanced option->recovery mode:


Drop into root shell:

If you use the ls command to find large files, you’ll see that sys.log and kern.log take huge space:

ls -s -S /var/log

You can empty the log files in Linux command line this way:

$ > syslog
$ > kern.log

Once that is done, reboot your system. You should be able to log in. You should quickly change the grub parameters as discussed above. Adding pci=noaer should help you in this case.

I know it’s more of a workaround than solution. But this is something that troubled me long and helped me get around the error. Otherwise I had to reinstall the system.

I just wanted to share what worked for me with the community here. I hope it helps you as well.

This article is written by Arun Shrimali. Arun is IT Head at Resonance Institute in India and he tries to implement Open Source Software across his organization.

The article has been edited by Abhishek Prakash.

 

 

How to Empty a Log File in Linux

Abhishek Prakash

Table of Contents

  1. 4 ways to empty a file in Linux

 

You’ll find yourself in situations where you need to empty a file. This often happens when you have huge log files and How would you do that?

One not so clean way would be to remove the file and then create a new file. But this is not a good idea. It won’t be the same file, the timestamp (atime, mtime etc) will be different along with other file permissions.

Instead of creating a new empty file, you can delete its content. So, how do you empty a file in Linux? How to clear a file from all of its content without deleting the actual file?

4 ways to empty a file in Linux

There are several ways you can empty a file without actually deleting the file. Let me show you some of these methods.

Method 1: Truncate a file using truncate command

The safest way to truncate a log file is using the truncate command.

truncate -s 0 filename

In the above command, -s is used to set/adjust the size (in bytes) of the file. When you use -s 0, it means you adjusted the file size to 0 bytes. In

Method 2: Empty file using :> or >

The simplest way to empty a file is to use the command below. If the file is not in use, it will work in Bash:

> filename

While the above works only in Bash Shell, you can use a similar command for other shells:

:> filename

You can also use this command to clear a file:

true > filename

Method 3: Using echo command to empty file in Linux

Another way to empty a file is via echo command in Linux:

echo > filename

You can also use echo command in this way:

echo "" > filename

Method 4: Use /dev/null to clear a file

You can also use the famous /dev/null and combine with the cat command to clear a log file:

cat /dev/null > file.log

In the end…

And if you don’t have enough permissions for any of the above commands, this is the sure shot but a little dirty way to achieve it:

touch newfile
mv newfile filename

You can also empty a file by deleting all lines in Vim editor.

If your aim was to clear log files and make some free space, you should learn about cleaning journald logs.

 

Troubleshooting PCIe Bus Error severity Corrected on Ubuntu and Linux Mint

ByCommunityUpdated onDecember 21, 2019

25 Comments

Reading Time: 5 minutes

Recently I was trying to install Mint on several nodes in my institute. At times, I was not able to install and got lots of ‘PCIe Bus’ errors on the screen. I have also observed similar issue with Ubuntu 18.04.

I got stuck into it for more than a month, after using many solution and observations (solution is the same, but observation and treatment may be different), I found something which was helpful for me and I think could be helpful for other Ubuntu and Linux Mint users.

Observations about PCIe Bus Error severity Corrected

It happened with my HP system and it seems that there is some compatibility issues with the HP hardware. The PCIe Bus Error is basically the Linux kernel reporting the hardware issue.

This error reporting turns into nightmare because of the frequency of error messages generated by the system. I have noticed in various Linux forums that many HP user have encountered this error, probably HP needs to improve Linux support for their hardware.

Do note that this doesn’t necessarily mean that you cannot use Linux on your HP system. You might be able to use Linux like everyone else. It’s just that seeing this message flashing on the screen on every boot is annoying and sometimes, it could lead to bigger troubles.

If the system keeps on reporting, it will increase the log size. If you have limited space for root, it could mean that your system will stuck at the black screen displaying the PCIe error message and your system won’t be able to boot.

Now that you know a few things, let’s see how to tackle this error.

Handling PCIe Bus Error messages if you can boot in to your Linux system

If you see the PCIe Bus Error message on the screen while booting but you are still able to log in, you could do a workaround for this annoyance.

You can do little on the hardware compatibility front. I mean you (most probably) cannot go ahead and start coding drivers for your hardware or fix the existing drivers code. If your system works fine, your main concern should be that too much of error reporting doesn’t eat up the disk space.

In that regard, you can change the Linux kernel parameter and ask it to stop reporting the PCIe errors. To do that, you need to edit the grub configuration.

Basically, you just have to use a text editor for editing the file.

First thing first, make a backup of your grub config file so that you can revert in case if you are not sure of things you changed. Open a terminal and use the following command:

cp /etc/default/grub ~/grub.back

Now open the file with Gedit for editing:

sudo gedit /etc/default/grub

Look for the line that has GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”

Add pci=noaer in this line. AER stands for Advanced Error Reporting and ‘noaer’ asks the kernel to not use/log Advanced Error Reporting. The changed line should look like this:

 GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=noaer"

Once you have saved the file, you should update the grub using this command:

sudo update-grub

Restart Ubuntu and you shouldn’t see the ‘PCIe Bus Error severity Corrected messages’ anymore.

If this doesn’t fix the issue for you, you can try to change other kernel parameters.

Further troubleshooting: Disable MSI

Now you are resorting to hit and trial. You may try disabling MSI. Though Linux kernel supports MSI for several years now, a wrong implementation of MSI from some hardware manufacturer may lead to the PCIe errors.

The drill is practically the same as you saw in the previous section. You edit the grub configuration and make the GRUB_CMDLINE_LINUX_DEFAULT line look like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=nomsi"

Update grub and reboot the system:

sudo update-grub

Even further troubleshooting: Disable mmconf

I know it’s getting repetitive but if you are still facing the issue, it could be worth to give this a last try. This time, disable the mmconf parameter in Linux kernel.

mmconf means memory mapped config and if you have an old computer, a buggy BIOS may lead to this issue.

The steps remain the same. Just change the line GRUB_CMDLINE_LINUX_DEFAULT in your grub config to make it look like:

 GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=nommconf"

Can’t boot! How to edit grub config now?

In some cases, if you are not even able to boot at all, perhaps your root is out of space. An idea here would be to delete old log files and see if you could boot now and if yes, change the grub config.

On reboot, if you stuck with logs on the screen and do a hard boot (use power button to turn it off and on again). When you power on, choose to go in to recovery mode from the grub screen. It

should be under Advanced options.

If your system doesn’t show the grub screen, press and hold shift key at boot. In some systems, pressing the Esc key brings the grub screen.

In the advanced option->recovery mode:


Drop into root shell:

If you use the ls command to find large files, you’ll see that sys.log and kern.log take huge space:

ls -s -S /var/log

You can empty the log files in Linux command line this way:

$ > syslog
$ > kern.log

Once that is done, reboot your system. You should be able to log in. You should quickly change the grub parameters as discussed above. Adding pci=noaer should help you in this case.

I know it’s more of a workaround than solution. But this is something that troubled me long and helped me get around the error. Otherwise I had to reinstall the system.

I just wanted to share what worked for me with the community here. I hope it helps you as well.

This article is written by Arun Shrimali. Arun is IT Head at Resonance Institute in India and he tries to implement Open Source Software across his organization.

The article has been edited by Abhishek Prakash.

 

 

How to Empty a Log File in Linux

Abhishek Prakash

Table of Contents

  1. 4 ways to empty a file in Linux

 

You’ll find yourself in situations where you need to empty a file. This often happens when you have huge log files and How would you do that?

One not so clean way would be to remove the file and then create a new file. But this is not a good idea. It won’t be the same file, the timestamp (atime, mtime etc) will be different along with other file permissions.

Instead of creating a new empty file, you can delete its content. So, how do you empty a file in Linux? How to clear a file from all of its content without deleting the actual file?

4 ways to empty a file in Linux

There are several ways you can empty a file without actually deleting the file. Let me show you some of these methods.

Method 1: Truncate a file using truncate command

The safest way to truncate a log file is using the truncate command.

truncate -s 0 filename

In the above command, -s is used to set/adjust the size (in bytes) of the file. When you use -s 0, it means you adjusted the file size to 0 bytes. In

Method 2: Empty file using :> or >

The simplest way to empty a file is to use the command below. If the file is not in use, it will work in Bash:

> filename

While the above works only in Bash Shell, you can use a similar command for other shells:

:> filename

You can also use this command to clear a file:

true > filename

Method 3: Using echo command to empty file in Linux

Another way to empty a file is via echo command in Linux:

echo > filename

You can also use echo command in this way:

echo "" > filename

Method 4: Use /dev/null to clear a file

You can also use the famous /dev/null and combine with the cat command to clear a log file:

cat /dev/null > file.log

In the end…

And if you don’t have enough permissions for any of the above commands, this is the sure shot but a little dirty way to achieve it:

touch newfile
mv newfile filename

You can also empty a file by deleting all lines in Vim editor.

If your aim was to clear log files and make some free space, you should learn about cleaning journald logs.

 

728x90