LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 03-29-2016, 08:37 AM   #1
floppy_stuttgart
Senior Member
 
Registered: Nov 2010
Location: EU mainland
Distribution: Debian like
Posts: 1,153
Blog Entries: 5

Rep: Reputation: 107Reputation: 107
Partitions resized; PC dont boot anymore; how to solve?


Hello,
I have on my PC hp7100 an antix.
I resized the boot sda2 from 5,02 to 7,86 GB (after this, the PC booted correctly 1 time) and tried to update the fglrx driver using sgfxi.
Now, the PC start and it stay with "GRUB" on the black screen (no keyboard control).
All /media/sda2/boot/grub files are there.
The Menu.lst file is
timeout 5
color cyan/blue white/blue
foreground ffffff
background 0639a1
gfxmenu /boot/grub/message
title antiX at sda2, kernel 3.7.10-antix.7-486-smp
root (hd0,1)
kernel /boot/vmlinuz-3.7.10-antix.7-486-smp root=/dev/sda2 quiet radeon.modeset=0
initrd /boot/initrd.img-3.7.10-antix.7-486-smp

etc.

/media/sda2/boot/vmlinuz... and initrd... files are there.
So, can somebody help and inform what to do in order to make the PC booting again?
 
Old 03-29-2016, 03:08 PM   #2
purevw
Member
 
Registered: Jan 2007
Location: Texas
Distribution: OpenSuSE Tumbleweed, Kernel 4.14*
Posts: 137

Rep: Reputation: 52
If your system booted correctly after the partition resize, then that should not be an issue.

You say that you upgraded fglrx, but in your "kernel" line of "Menu.lst", it appears to be a command for the Radeon driver, which is not fglrx.

It would also be helpful to be very clear about what hardware you are using. HP DC7100 can be configured several ways.

You say that you get "grub" on the screen with no keyboard control. Could you be a bit more specific as to what exactly is happening during boot?

If you did indeed upgrade fglrx, did you create a new initrd so the the updated driver was included?

Basically, the more information you give, the better your responses will be.
 
Old 03-29-2016, 06:56 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,124

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
More importantly, how did you "grow" the partition. EXACTLY how did you grow the partition ?. Did /dev/sda1 also get adjusted ?.

I would guess the start of the partition has moved. Should be able to fix it by chrooting into the system and updating grub.
 
1 members found this post helpful.
Old 03-29-2016, 07:22 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,976

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
Might be worth it to boot to a live media and start with checking the filesystem if possible.

While files may appear to be there, they may be not. When you resize and some problem exists it could still show you the file structure and names but not the data. It is a less likely issue to what I suspect you have.
 
Old 03-29-2016, 07:28 PM   #5
coltree
Member
 
Registered: Nov 2003
Location: Jacobs Well, Queensland AU
Distribution: OpenBSD
Posts: 102
Blog Entries: 1

Rep: Reputation: 34
When you changed the boot partition you didn't mention running update-grub

what is your partition setup ?
/
/boot
etc

you could run from a live cd,
mount / partion at /mnt,
mount /boot partition at /mnt/boot,
cd /mnt
chroot .
update-grub
exit
 
Old 03-29-2016, 08:59 PM   #6
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,776

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by purevw View Post
If your system booted correctly after the partition resize, then that should not be an issue.
Not necessarily. It is possible to create a "time bomb". The boot loader always begins by loading itself from a set of disk addresses that are embedded in the primary boot loader in the MBR. (There's only so much you can do in 446 bytes of code.) Depending on what boot loader you are using and how it is configured, those might be data blocks from files in the boot filesystem. If those files get moved to a different physical position, the old, unerased data blocks will remain, and the system will continue to boot. But, it's dependent on the data in blocks that the filesystem considers to be free. As soon as some innocent change causes those old data blocks to be used for something else, booting suddenly fails. That can happen months, or even years, after the time bomb was set.

Last edited by rknichols; 03-29-2016 at 09:00 PM.
 
1 members found this post helpful.
Old 03-29-2016, 10:39 PM   #7
coltree
Member
 
Registered: Nov 2003
Location: Jacobs Well, Queensland AU
Distribution: OpenBSD
Posts: 102
Blog Entries: 1

Rep: Reputation: 34
Yes RK that's the problem,
so Floppy, just do it,
When you make a partition change, just do update-grub, safe housekeeping.
If it had been done immediately after changing the partition, this conversation wouldn't be happening.
Crafty old timers can do quite a bit in 434 or 440 bytes (modern standard MBR). but if you have 4k sectors and partitions only start on a sector, there's 3 1/2k spare, MBRs are so outdated.
 
3 members found this post helpful.
Old 03-30-2016, 02:39 AM   #8
floppy_stuttgart
Senior Member
 
Registered: Nov 2010
Location: EU mainland
Distribution: Debian like
Posts: 1,153

Original Poster
Blog Entries: 5

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by purevw View Post
If your system booted correctly after the partition resize, then that should not be an issue.

You say that you upgraded fglrx, but in your "kernel" line of "Menu.lst", it appears to be a command for the Radeon driver, which is not fglrx.

It would also be helpful to be very clear about what hardware you are using. HP DC7100 can be configured several ways.

You say that you get "grub" on the screen with no keyboard control. Could you be a bit more specific as to what exactly is happening during boot?

If you did indeed upgrade fglrx, did you create a new initrd so the the updated driver was included?

Basically, the more information you give, the better your responses will be.
The answer are:

I dont know if
a) the resizing
b) the sgfxi use (target: upgrade of fglrx; it was not sucessfull)
made the PC not booting again

The radeon boot code was necessary to make working the grafic card

HP DC7100: intel grafic chip on board; additional radeon card in the free PCI (the card I use)
System: Host: hp7100 Kernel: 3.7.10-antix.7-486-smp i686 (32 bit)
Desktop: Fluxbox 1.3.2
Distro: antiX-13.1_386-base Luddite 19 June 2013
Machine: System: Hewlett-Packard product: HP Compaq dc7100 USDT(DX877AV) serial: HUB5090KPM
Mobo: Hewlett-Packard model: 0980h serial: HUB5090KPM
Bios: Hewlett-Packard v: 786C1 v02.15 date: 08/07/2008
CPU: Single core Intel Pentium 4 (-HT-) cache: 2048 KB
clock speeds: max: 3393 MHz 1: 3393 MHz 2: 3393 MHz
Graphics: Card: Advanced Micro Devices [AMD] ATI Cedar PRO [Radeon HD 5450/6350]
Display Server: X.org 1.12.4 driver: fglrx
tty size: 80x24 Advanced Data: N/A for root
...
Info: Processes: 94 Uptime: 1 min Memory: 181.9/3040.2MB
Client: Shell (bash) inxi: 2.2.19

"grub" on the screen with no keyboard control: it means I see the Letters G R U B on the top left and when I push on the keyboard, it makes only a "bip"

did you create a new initrd so the the updated driver was included? No. I dont know how.
 
Old 03-30-2016, 04:13 AM   #9
floppy_stuttgart
Senior Member
 
Registered: Nov 2010
Location: EU mainland
Distribution: Debian like
Posts: 1,153

Original Poster
Blog Entries: 5

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by syg00 View Post
More importantly, how did you "grow" the partition. EXACTLY how did you grow the partition ?. Did /dev/sda1 also get adjusted ?.

I would guess the start of the partition has moved. Should be able to fix it by chrooting into the system and updating grub.
I modified the size of the partition with a koppix live USB.
a) reduced sda1 size
b) increased sda2 size (to the freed size of a)
chrooting and updating grub.. ? how witha knoppix live CD?
I will now start an ultimate Boot CD and see what can be done.
 
Old 03-30-2016, 05:03 AM   #10
floppy_stuttgart
Senior Member
 
Registered: Nov 2010
Location: EU mainland
Distribution: Debian like
Posts: 1,153

Original Poster
Blog Entries: 5

Rep: Reputation: 107Reputation: 107
I am now in the PC with PartedMagic.
According https://wiki.debianforum.de/Grub_reparieren I made

Quote:
ls /media/sda2/boot/grub
default jfs_stage1_5 message stage1
e2fs_stage1_5 menu.lst minix_stage1_5 stage2
fat_stage1_5 menu.lst~ reiserfs_stage1_5 xfs_stage1_5


Quote:
fdisk -l
Disk /dev/sda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00004043

Device Boot Start End Blocks Id System
/dev/sda1 * 1 3840 30842879+ 83 Linux
/dev/sda2 3840 4866 8238080 83 Linux


Quote:
grub-install /dev/sda --root-directory=/media/sda2
the error is coming
Quote:
The file /media/sda2/boot/grub/stage1 not read correctly.
Quote:
cat /media/sda2/etc/mtab
rootfs / rootfs rw 0 0
tmpfs / tmpfs rw,relatime 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
/dev/loop0 /lib/unionfs/usr squashfs ro,relatime 0 0
unionfs /usr unionfs rw,relatime,dirs=/usr=rw:/lib/unionfs/usr=ro 0 0
/dev/loop1 /lib/unionfs/firmware squashfs ro,relatime 0 0
unionfs /lib/firmware unionfs rw,relatime,dirs=/lib/firmware=rw:/lib/unionfs/firmware=ro 0 0
/dev/loop2 /lib/unionfs/modules squashfs ro,relatime 0 0
unionfs /lib/modules unionfs rw,relatime,dirs=/lib/modules=rw:/lib/unionfs/modules=ro 0 0
devpts /dev/pts devpts rw,relatime,gid=5,mode=620 0 0
/dev/sda2 /media/sda2 ext4 rw,relatime,barrier=1,data=ordered 0 0

finally
Quote:
grub-install --recheck /dev/sda --root-directory=/media/sda2
/usr/sbin/grub-install: line 291: grub-mkdevicemap: command not found
sed: can't read /media/sda2/boot/grub/device.map: No such file or directory
grub-probe: error: Cannot open `/media/sda2/boot/grub/device.map'

Any advice is welcome how to solve the issue > should I edit mtab and manually change from sda2 in sda1?

Last edited by floppy_stuttgart; 03-30-2016 at 07:49 AM.
 
Old 03-30-2016, 09:10 AM   #11
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,499

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
Your problem is the result of moving the location of the Grub files on the partition and not updating Grub before rebooting. Because of that, the tiny Grub code in the MBR is looking for the other Grub files on your boot partition where they were before you changed the partition and they are not there. The simplest solution would have been to use your AntiX installation CD to re-install Grub immediately.

Your first post clearly shows the Grub boot menu is Grub Legacy. The commands update-grub and grub-mkconfig will not work on Grub Legacy and the most likely reason you are getting the errors shown in your last post is that you are trying to update Grub2 from the Parted MagicCD and you have Grub Legacy installed. The link below explains in detail how to update Grub Legacy.

https://www.terabyteunlimited.com/kb/article.php?id=232

Quote:
grub-install /dev/sda --root-directory=/media/sda2
The command above is wrong because you have a separate boot partition so replace --root-directory with --boot-directory. If you do that, you will have to obviously chroot and update the new Grub2 with the grub-mkconfig command.

Moving boot files is always a risky proposition as you seem to have found out. Research before changing them.
 
2 members found this post helpful.
Old 03-31-2016, 12:58 AM   #12
floppy_stuttgart
Senior Member
 
Registered: Nov 2010
Location: EU mainland
Distribution: Debian like
Posts: 1,153

Original Poster
Blog Entries: 5

Rep: Reputation: 107Reputation: 107
I am installing antix15 over antix13 (that topic is overwritten with.. other issues.. like desktop setup is messed up.. ha ha): it boots now. I close this thread.
THANKS to all for the support.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux does not boot on logical partitions anymore ingmember Linux - Newbie 9 10-27-2009 05:05 PM
startx doesn't work - because i dont have the graphic card anymore s0p3rsa1yan Slackware 4 02-05-2009 07:54 PM
new hard drive, resized partitions, need to redo grub dcalki Linux - Newbie 6 09-30-2007 10:30 PM
Resized Linux Partition on Dual Boot - Lost Boot RationalRabbit Linux - Newbie 14 12-29-2005 01:02 AM
I dont want the MAC GUI in redhat anymore Laxin22 Linux - Newbie 1 02-17-2002 01:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration